1 write to Path
Microsoft.CodeAnalysis (1)
CommandLine\CommandLineSourceFile.cs (1)
23Path = path;
64 references to Path
Microsoft.CodeAnalysis (10)
AdditionalTextFile.cs (1)
48public override string Path => _sourceFile.Path;
CommandLine\CommonCompiler.cs (9)
258var filePath = file.Path; 265return EncodedStringText.Create(data, _fallbackEncoding, Arguments.Encoding, Arguments.ChecksumAlgorithm, canBeEmbedded: EmbeddedSourcePaths.Contains(file.Path)); 270return EncodedStringText.Create(data, _fallbackEncoding, Arguments.Encoding, Arguments.ChecksumAlgorithm, canBeEmbedded: EmbeddedSourcePaths.Contains(file.Path)); 421var embeddedFileOrderedSet = new OrderedSet<string>(Arguments.EmbeddedFiles.Select(e => e.Path)); 488var set = new HashSet<string>(arguments.EmbeddedFiles.Select(f => f.Path)); 489set.IntersectWith(arguments.SourceFiles.Select(f => f.Path)); 919sourceFileAnalyzerConfigOptions = Arguments.SourceFiles.SelectAsArray(f => analyzerConfigSet.GetOptionsForSourcePath(f.Path)); 1602Debug.Assert(PathUtilities.IsAbsolute(file.Path)); 1603if (filePaths.Add(PathUtilities.ExpandAbsolutePathWithRelativeParts(file.Path)))
Microsoft.CodeAnalysis.CSharp (2)
CommandLine\CSharpCommandLineParser.cs (1)
1709simpleName = PathUtilities.RemoveExtension(PathUtilities.GetFileName(sourceFiles.FirstOrDefault().Path));
CommandLine\CSharpCompiler.cs (1)
210file.Path);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (44)
CommandLineTests.cs (43)
462AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "a.cs"), Path.Combine(WorkingDirectory, "b.cs") }, cmd.Arguments.SourceFiles.Select(file => file.Path)); 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}"))); 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)); 6698AssertEx.Equal(new[] { @"d:\abc def\baz.cs", @"c:\abc de.cs" }, args.SourceFiles.Select(file => file.Path)); 9951Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles.Single().Path); 9956Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9957Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path); 9962Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9963Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[1].Path); 9967Assert.Equal(Path.Combine(WorkingDirectory, "..\\web.config"), args.AdditionalFiles.Single().Path); 9977Assert.Equal(Path.Combine(baseDir.Path, "web1.config"), args.AdditionalFiles[0].Path); 9978Assert.Equal(Path.Combine(baseDir.Path, "web2.config"), args.AdditionalFiles[1].Path); 9979Assert.Equal(Path.Combine(baseDir.Path, "web3.config"), args.AdditionalFiles[2].Path); 9984Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9985Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path); 9990Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9991Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path); 9996Assert.Equal(Path.Combine(WorkingDirectory, "web.config"), args.AdditionalFiles[0].Path); 9997Assert.Equal(Path.Combine(WorkingDirectory, "app.manifest"), args.AdditionalFiles[1].Path); 10002Assert.Equal(Path.Combine(WorkingDirectory, "web.config,app.manifest"), args.AdditionalFiles[0].Path); 10007Assert.Equal(Path.Combine(WorkingDirectory, "web.config:app.manifest"), args.AdditionalFiles[0].Path); 11489args.SourceFiles.Select(x => x.Path)); 11494args.SourceFiles.Select(x => x.Path)); 11516AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11520AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "@script.csx") }, args.SourceFiles.Select(f => f.Path)); 11524AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "-script.csx") }, args.SourceFiles.Select(f => f.Path)); 11528AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11532AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11536AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11541AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11546AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "script.csx") }, args.SourceFiles.Select(f => f.Path)); 11551AssertEx.Equal(new[] { Path.Combine(WorkingDirectory, "--") }, args.SourceFiles.Select(f => f.Path));
TouchedFileLoggingTests.cs (1)
217expectedReads.Add(file.Path);
Microsoft.CodeAnalysis.InteractiveHost (1)
Interactive\Core\InteractiveHost.Service.cs (1)
564initializationScriptPath = args.SourceFiles.IsEmpty ? null : args.SourceFiles[0].Path;
Microsoft.CodeAnalysis.Scripting (1)
Hosting\CommandLine\CommandLineRunner.cs (1)
127var scriptPathOpt = sourceFiles.IsEmpty ? null : sourceFiles[0].Path;
Microsoft.CodeAnalysis.VisualBasic (2)
CommandLine\VisualBasicCompiler.vb (2)
76file.Path) 138touchedFilesLogger.AddRead(file.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));
VBCSCompiler.UnitTests (1)
TouchedFileLoggingTests.cs (1)
169expectedReads.Add(file.Path);