1 write to Path
Microsoft.CodeAnalysis (1)
CommandLine\CommandLineSourceFile.cs (1)
23Path = path;
76 references to Path
Microsoft.CodeAnalysis (10)
AdditionalTextFile.cs (1)
48public override string Path => _sourceFile.Path;
CommandLine\CommonCompiler.cs (9)
270var filePath = file.Path; 277return EncodedStringText.Create(data, _fallbackEncoding, Arguments.Encoding, Arguments.ChecksumAlgorithm, canBeEmbedded: EmbeddedSourcePaths.Contains(file.Path)); 282return EncodedStringText.Create(data, _fallbackEncoding, Arguments.Encoding, Arguments.ChecksumAlgorithm, canBeEmbedded: EmbeddedSourcePaths.Contains(file.Path)); 433var embeddedFileOrderedSet = new OrderedSet<string>(Arguments.EmbeddedFiles.Select(e => e.Path)); 500var set = new HashSet<string>(arguments.EmbeddedFiles.Select(f => f.Path)); 501set.IntersectWith(arguments.SourceFiles.Select(f => f.Path)); 931sourceFileAnalyzerConfigOptions = Arguments.SourceFiles.SelectAsArray(f => analyzerConfigSet.GetOptionsForSourcePath(f.Path)); 1605Debug.Assert(PathUtilities.IsAbsolute(file.Path)); 1606if (filePaths.Add(PathUtilities.ExpandAbsolutePathWithRelativeParts(file.Path)))
Microsoft.CodeAnalysis.CSharp (2)
CommandLine\CSharpCommandLineParser.cs (1)
1676simpleName = PathUtilities.RemoveExtension(PathUtilities.GetFileName(sourceFiles.FirstOrDefault().Path));
CommandLine\CSharpCompiler.cs (1)
210file.Path);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (42)
CommandLineTests.cs (42)
511string[] resolvedSourceFiles = args.SourceFiles.Select(f => f.Path).ToArray(); 607string[] resolvedSourceFiles = args.SourceFiles.Select(f => f.Path).ToArray(); 716resolvedSourceFiles = args.SourceFiles.Select(f => f.Path).ToArray(); 721resolvedSourceFiles = args.SourceFiles.Select(f => f.Path).ToArray(); 726resolvedSourceFiles = args.SourceFiles.Select(f => f.Path).ToArray(); 1240parsedArgs.SourceFiles.Select((file) => file.Path.Replace(dir.ToString(), "{DIR}"))); 1245parsedArgs.SourceFiles.Select((file) => file.Path.Replace(dir.ToString(), "{DIR}"))); 2338parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2344parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2350parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2356parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2362parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2368parsedArgs.EmbeddedFiles.Select(f => f.Path)); 6684AssertEx.Equal(new[] { @"d:\abc def\baz.cs", @"c:\abc de.cs" }, args.SourceFiles.Select(file => file.Path)); 9888Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles.Single().Path); 9893Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9894Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path); 9899Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9900Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[1].Path); 9904Assert.Equal(Path.Combine(WorkingDirectory, "..\\web.config"), args.AdditionalFiles.Single().Path); 9914Assert.Equal(Path.Combine(baseDir.Path, "web1.config"), args.AdditionalFiles[0].Path); 9915Assert.Equal(Path.Combine(baseDir.Path, "web2.config"), args.AdditionalFiles[1].Path); 9916Assert.Equal(Path.Combine(baseDir.Path, "web3.config"), args.AdditionalFiles[2].Path); 9921Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9922Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path); 9927Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9928Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path); 9933Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9934Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path); 9939Assert.Equal(Path.Combine(WorkingDirectory, "web.config,app.manifest"), args.AdditionalFiles[0].Path); 9944Assert.Equal(Path.Combine(WorkingDirectory, "web.config:app.manifest"), args.AdditionalFiles[0].Path); 11426args.SourceFiles.Select(x => x.Path)); 11431args.SourceFiles.Select(x => x.Path)); 11453AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11457AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "@script.csx") }, args.SourceFiles.Select(f => f.Path)); 11461AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "-script.csx") }, args.SourceFiles.Select(f => f.Path)); 11465AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11469AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11473AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11478AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11483AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11488AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "--") }, args.SourceFiles.Select(f => f.Path));
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.Service.cs (1)
564initializationScriptPath = args.SourceFiles.IsEmpty ? null : args.SourceFiles[0].Path;
Microsoft.CodeAnalysis.VisualBasic (2)
CommandLine\VisualBasicCompiler.vb (2)
75file.Path) 137touchedFilesLogger.AddRead(file.Path)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (16)
CommandLineTests.vb (16)
7787Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7788Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path) 7793Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7794Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(1).Path) 7808Assert.Equal(Path.Combine(baseDir.Path, "web1.config"), args.AdditionalFiles(0).Path) 7809Assert.Equal(Path.Combine(baseDir.Path, "web2.config"), args.AdditionalFiles(1).Path) 7810Assert.Equal(Path.Combine(baseDir.Path, "web3.config"), args.AdditionalFiles(2).Path) 7815Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7816Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path) 7821Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7822Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path) 7827Assert.Equal(Path.Combine(_baseDirectory, "web.config,app.manifest"), args.AdditionalFiles(0).Path) 7832Assert.Equal(Path.Combine(_baseDirectory, "web.config,app.manifest"), args.AdditionalFiles(0).Path) 7837Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7838Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path) 7843Assert.Equal(Path.Combine(_baseDirectory, "web.config:app.manifest"), args.AdditionalFiles(0).Path)
Microsoft.CodeAnalysis.Workspaces (3)
Workspace\CommandLineProject.cs (3)
151var absolutePath = Path.IsPathRooted(fileArg.Path) || string.IsNullOrEmpty(projectDirectory) 152? Path.GetFullPath(fileArg.Path) 153: Path.GetFullPath(Path.Combine(projectDirectory, fileArg.Path));