11 overrides of FilePath
Microsoft.CodeAnalysis.CSharp (3)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.VisualBasic (3)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
305 references to FilePath
AnalyzerRunner (1)
BuildValidator (1)
ConfigurationSchemaGenerator (3)
IdeCoreBenchmarks (1)
Microsoft.Analyzers.Extra.Tests (1)
Microsoft.Analyzers.Local.Tests (1)
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Microsoft.AspNetCore.Http.Extensions.Tests (2)
Microsoft.AspNetCore.Http.Microbenchmarks (2)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
Microsoft.CodeAnalysis (38)
Microsoft.CodeAnalysis.CodeStyle (8)
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
Microsoft.CodeAnalysis.CSharp (27)
Syntax\CSharpSyntaxTree.cs (5)
579FilePath,
647=> new(FilePath, GetLinePosition(span.Start, cancellationToken), GetLinePosition(span.End, cancellationToken));
658/// otherwise it's <see cref="SyntaxTree.FilePath"/>.
666=> GetDirectiveMap().TranslateSpan(GetText(cancellationToken), this.FilePath, span);
688=> GetDirectiveMap().TranslateSpanAndVisibility(GetText(), FilePath, span, out isHiddenPosition);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (7)
Diagnostics\DiagnosticAnalyzerTests.cs (5)
1015string.Format(CodeAnalysisResources.InvalidDiagnosticLocationReported, AnalyzerWithInvalidDiagnosticLocation.Descriptor.Id, treeInAnotherCompilation.FilePath), "diagnostic").Message;
1108string.Format(CodeAnalysisResources.InvalidDiagnosticSpanReported, AnalyzerWithInvalidDiagnosticSpan.Descriptor.Id, badSpan, treeInAnotherCompilation.FilePath), "diagnostic").Message;
1585diagnosticArgument = tree.FilePath;
1591AddExpectedNonLocalDiagnostic(builder, GeneratedCodeAnalyzer.Summary, "PartialType(IsGeneratedCode:False)", $"{compilation.SyntaxTrees[0].FilePath}(IsGeneratedCode:False)");
1708var files = compilation.SyntaxTrees.Select(t => t.FilePath).ToImmutableArray();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (57)
SourceGeneration\SyntaxAwareGeneratorTests.cs (55)
870Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
871Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
872Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
916Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
917Assert.EndsWith("classC.cs", results.GeneratedTrees[1].FilePath);
918Assert.EndsWith("classD.cs", results.GeneratedTrees[2].FilePath);
962Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
963Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
964Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
973Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
974Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
975Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
984Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
985Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
986Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
1029Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
1030Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
1031Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
1047Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
1048Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
1049Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
1050Assert.EndsWith("fieldD.cs", results.GeneratedTrees[3].FilePath);
1051Assert.EndsWith("fieldE.cs", results.GeneratedTrees[4].FilePath);
1104Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
1105Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
1106Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
1107Assert.EndsWith("fieldD.cs", results.GeneratedTrees[3].FilePath);
1108Assert.EndsWith("fieldE.cs", results.GeneratedTrees[4].FilePath);
1128Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
1129Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
1130Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
1236Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
1237Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
1238Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
1265Assert.EndsWith("fieldD.cs", results.GeneratedTrees[0].FilePath);
1266Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
1267Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
1323Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
1324Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
1325Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
1336Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
1337Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
1338Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
1349Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
1350Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
1351Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
1411Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
1412Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
1413Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
1441Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
1442Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
1443Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
1474Assert.EndsWith("fieldA.cs", results.GeneratedTrees[0].FilePath);
1475Assert.EndsWith("fieldB.cs", results.GeneratedTrees[1].FilePath);
1476Assert.EndsWith("fieldC.cs", results.GeneratedTrees[2].FilePath);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\UsedAssembliesTests.cs (3)
164yield return (comp.ReplaceSyntaxTree(tree, CSharpTestBase.Parse(builder.ToString(), tree.FilePath, (CSharpParseOptions)tree.Options)), before, after);
192yield return (comp.ReplaceSyntaxTree(tree, CSharpTestBase.Parse(builder.ToString(), tree.FilePath, parseOptions)), before, after);
203yield return (comp.ReplaceSyntaxTree(tree, CSharpTestBase.Parse(builder.ToString(), tree.FilePath, parseOptions)).
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (9)
Microsoft.CodeAnalysis.Features (13)
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Microsoft.CodeAnalysis.Rebuild (1)
Microsoft.CodeAnalysis.Rebuild.UnitTests (2)
Microsoft.CodeAnalysis.Test.Utilities (12)
Microsoft.CodeAnalysis.VisualBasic (27)
Compilation\SemanticModel.vb (17)
3588Return String.Format("{0}: at {1}", Me.SyntaxTree.FilePath, position)
3592If node Is Nothing Then Return Me.SyntaxTree.FilePath
3593Return String.Format("{0}: {1} ({2})", Me.SyntaxTree.FilePath, node.Kind.ToString(), node.Position)
3597If node Is Nothing Then Return Me.SyntaxTree.FilePath
3598Return String.Format("{0}: {1} ({2}) at {3}", Me.SyntaxTree.FilePath, node.Kind.ToString(), node.Position, position)
3602If firstStatement Is Nothing OrElse lastStatement Is Nothing Then Return Me.SyntaxTree.FilePath
3603Return String.Format("{0}: {1} to {2}", Me.SyntaxTree.FilePath, firstStatement.Position, lastStatement.EndPosition)
3607If expression Is Nothing OrElse type Is Nothing Then Return Me.SyntaxTree.FilePath
3608Return String.Format("{0}: {1} ({2}) -> {3} {4}", Me.SyntaxTree.FilePath, expression.Kind.ToString(), expression.Position, type.TypeKind.ToString(), type.Name)
3612If expression Is Nothing OrElse type Is Nothing Then Return Me.SyntaxTree.FilePath
3613Return String.Format("{0}: {1} ({2}) -> {3} {4} at {5}", Me.SyntaxTree.FilePath, expression.Kind.ToString(), expression.Position, type.TypeKind.ToString(), type.Name, position)
3617If expression Is Nothing Then Return Me.SyntaxTree.FilePath
3618Return String.Format("{0}: {1} ({2}) at {3} ({4})", Me.SyntaxTree.FilePath, expression.Kind.ToString(), expression.Position, position, [option].ToString())
3622Return String.Format("{0}: {1} at {2} ({3})", Me.SyntaxTree.FilePath, name, position, [option].ToString())
3626If symbol Is Nothing Then Return Me.SyntaxTree.FilePath
3627Return String.Format("{0}: {1} {2} at {3}", Me.SyntaxTree.FilePath, symbol.Kind.ToString(), symbol.Name, position)
3631Return String.Format("{0} ({1})", Me.SyntaxTree.FilePath, stage.ToString())
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (15)
SymbolsTests\Source\SourceSymbolTests.vb (15)
340Assert.Equal("a.vb", locs(0).SourceTree.FilePath)
342Assert.Equal("b.vb", locs(1).SourceTree.FilePath)
349Assert.Equal("a.vb", locs(0).SourceTree.FilePath)
351Assert.Equal("b.vb", locs(1).SourceTree.FilePath)
358Assert.Equal("a.vb", locs(0).SourceTree.FilePath)
360Assert.Equal("b.vb", locs(1).SourceTree.FilePath)
366Assert.Equal("a.vb", locs(0).SourceTree.FilePath)
372Assert.Equal("a.vb", locs(0).SourceTree.FilePath)
378Assert.Equal("a.vb", locs(0).SourceTree.FilePath)
385Assert.Equal("a.vb", locs(0).SourceTree.FilePath)
387Assert.Equal("b.vb", locs(1).SourceTree.FilePath)
394Assert.Equal("a.vb", locs(0).SourceTree.FilePath)
396Assert.Equal("b.vb", locs(1).SourceTree.FilePath)
403Assert.Equal("a.vb", locs(0).SourceTree.FilePath)
405Assert.Equal("b.vb", locs(1).SourceTree.FilePath)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (9)
Syntax\SyntaxTreeTests.vb (7)
156Assert.Equal(newTree.FilePath, "new.vb")
170Assert.Equal(newTree.FilePath, "new.vb")
182Assert.Equal(newTree.FilePath, "new.vb")
189Assert.Equal(String.Empty, oldTree.WithFilePath(Nothing).FilePath)
191Assert.Equal(String.Empty, oldTree.WithFilePath(Nothing).FilePath)
192Assert.Equal(String.Empty, SyntaxFactory.ParseSyntaxTree("", path:=Nothing).FilePath)
193Assert.Equal(String.Empty, VisualBasicSyntaxTree.Create(CType(oldTree.GetRoot, VisualBasicSyntaxNode), path:=Nothing).FilePath)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (5)
Microsoft.CodeAnalysis.Workspaces (20)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
Microsoft.CodeAnalysis.Workspaces.UnitTests (13)
SolutionTests\SolutionTests.cs (13)
3251Assert.Same(tree, tree.WithFilePath(tree.FilePath));
3272Assert.Equal(OldFilePath, oldDocument.GetSyntaxTreeAsync().Result.FilePath);
3280Assert.Equal(NewFilePath, newDocument.GetSyntaxTreeAsync().Result.FilePath);
3782Assert.Equal("new path", tree2.FilePath);
3810Assert.Equal("old path", tree3.FilePath);
3821Assert.Equal("old path", tree4.FilePath);
4082Assert.Equal("DocumentToFreeze.cs", tree.FilePath);
4107Assert.Equal("DocumentToFreeze.cs", tree.FilePath);
4616Assert.Equal("test5.cs", syntaxTrees[0].FilePath, StringComparer.OrdinalIgnoreCase);
4617Assert.Equal("test4.cs", syntaxTrees[1].FilePath, StringComparer.OrdinalIgnoreCase);
4618Assert.Equal("test3.cs", syntaxTrees[2].FilePath, StringComparer.OrdinalIgnoreCase);
4619Assert.Equal("test2.cs", syntaxTrees[3].FilePath, StringComparer.OrdinalIgnoreCase);
4620Assert.Equal("test1.cs", syntaxTrees[4].FilePath, StringComparer.OrdinalIgnoreCase);
Microsoft.VisualStudio.LanguageServices (4)
System.Text.Json.SourceGeneration (1)
System.Text.RegularExpressions.Generator (1)