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)
1674simpleName = 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(); 1226parsedArgs.SourceFiles.Select((file) => file.Path.Replace(dir.ToString(), "{DIR}"))); 1231parsedArgs.SourceFiles.Select((file) => file.Path.Replace(dir.ToString(), "{DIR}"))); 2324parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2330parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2336parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2342parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2348parsedArgs.EmbeddedFiles.Select(f => f.Path)); 2354parsedArgs.EmbeddedFiles.Select(f => f.Path)); 6670AssertEx.Equal(new[] { @"d:\abc def\baz.cs", @"c:\abc de.cs" }, args.SourceFiles.Select(file => file.Path)); 9874Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles.Single().Path); 9879Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9880Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path); 9885Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9886Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[1].Path); 9890Assert.Equal(Path.Combine(WorkingDirectory, "..\\web.config"), args.AdditionalFiles.Single().Path); 9900Assert.Equal(Path.Combine(baseDir.Path, "web1.config"), args.AdditionalFiles[0].Path); 9901Assert.Equal(Path.Combine(baseDir.Path, "web2.config"), args.AdditionalFiles[1].Path); 9902Assert.Equal(Path.Combine(baseDir.Path, "web3.config"), args.AdditionalFiles[2].Path); 9907Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9908Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path); 9913Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9914Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path); 9919Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9920Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path); 9925Assert.Equal(Path.Combine(WorkingDirectory, "web.config,app.manifest"), args.AdditionalFiles[0].Path); 9930Assert.Equal(Path.Combine(WorkingDirectory, "web.config:app.manifest"), args.AdditionalFiles[0].Path); 11412args.SourceFiles.Select(x => x.Path)); 11417args.SourceFiles.Select(x => x.Path)); 11439AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11443AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "@script.csx") }, args.SourceFiles.Select(f => f.Path)); 11447AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "-script.csx") }, args.SourceFiles.Select(f => f.Path)); 11451AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11455AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11459AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11464AssertEx.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)); 11474AssertEx.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)
7772Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7773Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path) 7778Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7779Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(1).Path) 7793Assert.Equal(Path.Combine(baseDir.Path, "web1.config"), args.AdditionalFiles(0).Path) 7794Assert.Equal(Path.Combine(baseDir.Path, "web2.config"), args.AdditionalFiles(1).Path) 7795Assert.Equal(Path.Combine(baseDir.Path, "web3.config"), args.AdditionalFiles(2).Path) 7800Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7801Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path) 7806Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7807Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path) 7812Assert.Equal(Path.Combine(_baseDirectory, "web.config,app.manifest"), args.AdditionalFiles(0).Path) 7817Assert.Equal(Path.Combine(_baseDirectory, "web.config,app.manifest"), args.AdditionalFiles(0).Path) 7822Assert.Equal(Path.Combine(_baseDirectory, "web.config"), args.AdditionalFiles(0).Path) 7823Assert.Equal(Path.Combine(_baseDirectory, "app.manifest"), args.AdditionalFiles(1).Path) 7828Assert.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));