4 overrides of FilePath
Microsoft.CodeAnalysis.CSharp (3)
Syntax\CSharpSyntaxTree.Dummy.cs (1)
63public override string FilePath
Syntax\CSharpSyntaxTree.LazySyntaxTree.cs (1)
39public override string FilePath
Syntax\CSharpSyntaxTree.ParsedSyntaxTree.cs (1)
57public override string FilePath
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Workspace\LanguageServices\CSharpSyntaxTreeFactoryService.ParsedSyntaxTree.cs (1)
24public override string FilePath { get; }
205 references to FilePath
ConfigurationSchemaGenerator (3)
RuntimeSource\Configuration.Binder\Specs\InterceptorInfo.cs (2)
193return sourceReferenceResolver?.NormalizePath(operationSyntaxTree.FilePath, baseFilePath: null) ?? operationSyntaxTree.FilePath;
RuntimeSource\SourceGenerators\DiagnosticInfo.cs (1)
34=> Location.Create(location.SourceTree?.FilePath ?? "", location.SourceSpan, location.GetLineSpan().Span);
dotnet-format (3)
Analyzers\AnalyzerRunner.cs (1)
88formattableDocumentPaths.Contains(diagnostic.Location.SourceTree.FilePath))
Analyzers\SolutionCodeFixApplier.cs (1)
112return projectDiagnostics.Where(diagnostic => diagnostic.Location.SourceTree?.FilePath == document.FilePath).ToImmutableArray();
Utilities\GeneratedCodeUtilities.cs (1)
24if (IsGeneratedCodeFileName(syntaxTree.FilePath))
GenerateDocumentationAndConfigFiles (11)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
51return IsGeneratedCodeFile(tree.FilePath) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (1)
22visitor.WriteString(symbol.DeclaringSyntaxReferences.FirstOrDefault()?.SyntaxTree.FilePath ?? "");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (2)
23visitor.WriteString(symbol.IsFileLocal ? symbol.DeclaringSyntaxReferences[0].SyntaxTree.FilePath : null); 183type.DeclaringSyntaxReferences[0].SyntaxTree.FilePath != filePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
457if (tree.FilePath == filePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
262WriteString(location.SourceTree.FilePath);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (4)
206afterSourceTree.FilePath == declarationList.FirstOrDefault()?.SyntaxTree.FilePath) 220beforeSourceTree.FilePath == declarationList.FirstOrDefault()?.SyntaxTree.FilePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
42var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath);
Microsoft.Analyzers.Extra.Tests (1)
Resources\RoslynTestUtils.cs (1)
530return diagnostics.Where(d => d.Location.SourceTree!.FilePath.EndsWith(document.Name));
Microsoft.Analyzers.Local.Tests (1)
Resources\RoslynTestUtils.cs (1)
531return diagnostics.Where(d => d.Location.SourceTree!.FilePath.EndsWith(document.Name));
Microsoft.AspNetCore.Components.AI.SourceGenerators (1)
ToolBlockCandidate.cs (1)
253return new LocationInfo(location.SourceTree.FilePath, location.SourceSpan, location.GetLineSpan().Span);
Microsoft.AspNetCore.Http.RequestDelegateGenerator (2)
src\aspnetcore\src\Shared\RoslynUtils\SyntaxTreeExtensions.cs (2)
13resolver?.NormalizePath(tree.FilePath, baseFilePath: null) ?? tree.FilePath;
Microsoft.CodeAnalysis (38)
CodeGen\SequencePointList.cs (3)
125lastDebugDocument = documentProvider(lastPath, basePath: lastPathIsMapped ? this._tree.FilePath : null); 151lastPath = currentTree.FilePath; 172lastDebugDocument = documentProvider(lastPath, basePath: lastPathIsMapped ? currentTree.FilePath : null);
CommandLine\CommonCompiler.cs (8)
435if (!EmbeddedSourcePaths.Contains(tree.FilePath)) 441if (embeddedTreeMap.ContainsKey(tree.FilePath)) 447embeddedTreeMap.Add(tree.FilePath, tree); 803/// <param name="generatedFilesBaseDirectory">The base directory for the <see cref="SyntaxTree.FilePath"/> of generated files.</param> 1177Debug.Assert(!string.IsNullOrWhiteSpace(tree.FilePath)); 1183embeddedTextBuilder.Add(EmbeddedText.FromSource(tree.FilePath, sourceText)); 1186analyzerOptionsBuilder.Add(analyzerConfigSet!.GetOptionsForSourcePath(tree.FilePath)); 1192var path = tree.FilePath;
Compilation\Compilation.cs (3)
2518if (!string.IsNullOrEmpty(tree.FilePath) && tree.GetText().Encoding == null) 2554if (!string.IsNullOrEmpty(tree.FilePath)) 2558string normalizedPath = documentsBuilder.NormalizeDebugDocumentPath(tree.FilePath, basePath: null);
Compilation\DeterministicKey.cs (1)
39=> _tree.FilePath;
Diagnostic\Location.cs (1)
100result += "(" + this.SourceTree?.FilePath + this.SourceSpan + ")";
DiagnosticAnalyzer\AnalysisContextInfo.cs (1)
97sb.AppendLine($"{nameof(SyntaxTree)}: {_file.Value.SourceTree.FilePath}");
DiagnosticAnalyzer\CompilationUnitCompletedEvent.cs (1)
37=> $"CompilationUnitCompletedEvent({CompilationUnit.FilePath}){FilterSpan}";
DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs (2)
99throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticLocationReported, id, location.SourceTree.FilePath), "diagnostic"); 105throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticSpanReported, id, location.SourceSpan, location.SourceTree.FilePath), "diagnostic");
EmbeddedText.cs (1)
37/// <remarks>See remarks of <see cref="SyntaxTree.FilePath"/></remarks>
PEWriter\MetadataWriter.cs (1)
1805if (documentsBuilder.TryGetDebugDocument(tree.FilePath, basePath: null) is { } doc && !_documentIndex.ContainsKey(doc))
ReferenceManager\CommonReferenceManager.Resolution.cs (4)
815if (localBoundReferenceDirectives != null && localBoundReferenceDirectives.ContainsKey((referenceDirective.Location.SourceTree.FilePath, referenceDirective.File))) 835localBoundReferenceDirectives.Add((referenceDirective.Location.SourceTree.FilePath, referenceDirective.File), boundReference); 872string? basePath = (tree != null && tree.FilePath.Length > 0) ? tree.FilePath : null;
SourceGeneration\GeneratedCodeUtilities.cs (1)
51return IsGeneratedCodeFile(tree.FilePath) ||
SourceGeneration\GeneratorDriverState.cs (1)
82/// The base directory for the <see cref="SyntaxTree.FilePath"/> of generated files.
Syntax\SyntaxTree.cs (6)
231/// otherwise it's <see cref="FilePath"/>. 293return resolver.NormalizePath(mappedSpan.Path, baseFilePath: mappedSpan.HasMappedPath ? FilePath : null) ?? mappedSpan.Path; 304return FilePath; 307return resolver.NormalizePath(FilePath, baseFilePath: null) ?? FilePath; 394/// Returns a new tree whose <see cref="FilePath"/> is the specified node and other properties are copied from the current tree.
Syntax\SyntaxTreeComparer.cs (3)
27return string.Equals(x.FilePath, y.FilePath, StringComparison.OrdinalIgnoreCase) && 33return Hash.Combine(obj.FilePath.GetHashCode(), SourceTextComparer.Instance.GetHashCode(obj.GetText()));
XmlFileResolver.cs (1)
44/// Path of the source file (<see cref="SyntaxTree.FilePath"/>) or XML document that contains the <paramref name="path"/>.
Microsoft.CodeAnalysis.Analyzers (11)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
51return IsGeneratedCodeFile(tree.FilePath) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (1)
22visitor.WriteString(symbol.DeclaringSyntaxReferences.FirstOrDefault()?.SyntaxTree.FilePath ?? "");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (2)
23visitor.WriteString(symbol.IsFileLocal ? symbol.DeclaringSyntaxReferences[0].SyntaxTree.FilePath : null); 183type.DeclaringSyntaxReferences[0].SyntaxTree.FilePath != filePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
457if (tree.FilePath == filePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
262WriteString(location.SourceTree.FilePath);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (4)
206afterSourceTree.FilePath == declarationList.FirstOrDefault()?.SyntaxTree.FilePath) 220beforeSourceTree.FilePath == declarationList.FirstOrDefault()?.SyntaxTree.FilePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
42var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath);
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
51return IsGeneratedCodeFile(tree.FilePath) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (1)
22visitor.WriteString(symbol.DeclaringSyntaxReferences.FirstOrDefault()?.SyntaxTree.FilePath ?? "");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (2)
23visitor.WriteString(symbol.IsFileLocal ? symbol.DeclaringSyntaxReferences[0].SyntaxTree.FilePath : null); 183type.DeclaringSyntaxReferences[0].SyntaxTree.FilePath != filePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
457if (tree.FilePath == filePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
262WriteString(location.SourceTree.FilePath);
Microsoft.CodeAnalysis.CodeStyle (9)
src\roslyn\src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (1)
76var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(tree.FilePath));
src\roslyn\src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (2)
148if (!PathUtilities.IsChildPath(projectDir, namespaceDeclaration.SyntaxTree.FilePath)) 157PathUtilities.GetDirectoryName(namespaceDeclaration.SyntaxTree.FilePath));
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
51return IsGeneratedCodeFile(tree.FilePath) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (1)
22visitor.WriteString(symbol.DeclaringSyntaxReferences.FirstOrDefault()?.SyntaxTree.FilePath ?? "");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (2)
23visitor.WriteString(symbol.IsFileLocal ? symbol.DeclaringSyntaxReferences[0].SyntaxTree.FilePath : null); 183type.DeclaringSyntaxReferences[0].SyntaxTree.FilePath != filePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
457if (tree.FilePath == filePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
262WriteString(location.SourceTree.FilePath);
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (2)
495.Select(d => (d.SyntaxTree.FilePath, d.Span)) 576if (constructorSpans.Contains((node.SyntaxTree.FilePath, node.Span)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (4)
206afterSourceTree.FilePath == declarationList.FirstOrDefault()?.SyntaxTree.FilePath) 220beforeSourceTree.FilePath == declarationList.FirstOrDefault()?.SyntaxTree.FilePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
42var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath);
Microsoft.CodeAnalysis.CSharp (33)
Binder\Binder_Symbols.cs (2)
2062arg0 = srcSymbol.GetFirstLocation().SourceTree.FilePath; 2216arg0 = first.GetFirstLocation().SourceTree.FilePath;
CommandLine\CSharpCompiler.cs (2)
262string entryPointFileName = PathUtilities.GetFileName(entryPoint.GetFirstLocation().SourceTree!.FilePath); 359string? resolvedPath = resolver.ResolveReference(path, tree.FilePath);
Compilation\CSharpCompilation.cs (10)
1130throw new KeyNotFoundException($"Syntax tree not found with file path: {tree.FilePath}"); 1157var path = resolver?.NormalizePath(tree.FilePath, baseFilePath: null) ?? tree.FilePath; 1209var path = FileUtilities.GetNormalizedPathOrOriginalPath(tree.FilePath, basePath: null); 1318RoslynDebug.Assert(directive.SyntaxTree.FilePath is object); 1321return ReferenceDirectiveMap.TryGetValue((directive.SyntaxTree.FilePath, directive.File.ValueText), out reference) ? reference : null; 3786if (!paths.Add(tree.FilePath)) 3788_duplicatePaths.Add(tree.FilePath); 3823var filePath = location.SourceTree?.FilePath; 4029var normalizedPath = documentsBuilder.NormalizeDebugDocumentPath(path, basePath: tree.FilePath);
Compilation\CSharpSemanticModel.cs (1)
5286var path = tree.FilePath;
Compilation\SyntaxAndDeclarationManager.cs (5)
226resolvedFilePath = resolver.ResolveReference(path, baseFilePath: tree.FilePath); 247loadedSyntaxTreeMapBuilder.Add(loadedTree.FilePath, loadedTree); 343loadedSyntaxTreeMap = loadedSyntaxTreeMap.Remove(tree.FilePath); 507loadedSyntaxTreeMapBuilder.Remove(tree.FilePath); 671return loadedSyntaxTreeMap.TryGetValue(tree.FilePath, out loadedTree) && (tree == loadedTree);
Emitter\Model\PEModuleBuilder.cs (1)
464Cci.DebugSourceDocument doc = DebugDocumentsBuilder.TryGetDebugDocument(span.Path, basePath: location.SourceTree.FilePath);
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
487path = syntax.SyntaxTree.FilePath;
Symbols\Source\SourceMethodSymbolWithAttributes.cs (6)
1204var normalizedPath = FileUtilities.GetNormalizedPathOrOriginalPath(attributeFilePath, basePath: SyntaxTree.FilePath); 1231=> tree.FilePath 1237var recommendedPath = PathUtilities.IsAbsolute(SyntaxTree.FilePath) 1238? PathUtilities.GetRelativePath(PathUtilities.GetDirectoryName(SyntaxTree.FilePath), suffixMatch.FilePath) 1239: suffixMatch.FilePath;
Syntax\CSharpSyntaxTree.cs (5)
580FilePath, 648=> new(FilePath, GetLinePosition(span.Start, cancellationToken), GetLinePosition(span.End, cancellationToken)); 659/// otherwise it's <see cref="SyntaxTree.FilePath"/>. 667=> GetDirectiveMap().TranslateSpan(GetText(cancellationToken), this.FilePath, span); 689=> GetDirectiveMap().TranslateSpanAndVisibility(GetText(), FilePath, span, out isHiddenPosition);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryImports\CSharpRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
75tree.FilePath.IndexOf("Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator") == -1)
Microsoft.CodeAnalysis.CSharp.Features (3)
Diagnostics\Analyzers\FileBasedPrograms\FileLevelDirectiveDiagnosticAnalyzer.cs (1)
54new SourceFile(tree.FilePath, tree.GetText(cancellationToken)),
QuickInfo\CSharpSemanticQuickInfoProvider.cs (1)
351var symbolFilePaths = symbol.DeclaringSyntaxReferences.Select(reference => reference.SyntaxTree.FilePath);
src\roslyn\src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryImports\CSharpRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
75tree.FilePath.IndexOf("Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator") == -1)
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\Usage\CSharpMissingShebangInFileBasedProgram.cs (1)
32if (!context.Tree.FilePath.Equals(entryPointFilePath, StringComparison.Ordinal))
Microsoft.CodeAnalysis.Features (21)
CodeFixes\Configuration\ConfigurationUpdater.cs (1)
435diagnosticFilePath = diagnosticSourceTree.FilePath.ToLowerInvariant();
CodeLens\CodeLensFindReferenceProgress.cs (2)
80_queriedNode.SyntaxTree.FilePath.Equals(candidateSyntaxNode.SyntaxTree.FilePath,
CodeLens\LocationComparer.cs (3)
22x.SourceTree.FilePath.Equals(y.SourceTree.FilePath, StringComparison.OrdinalIgnoreCase); 33StringComparer.OrdinalIgnoreCase.GetHashCode(obj.SourceTree.FilePath));
EditAndContinue\ActiveStatementsMap.cs (2)
211var targetPath = mappedSection.HasMappedPath ? mappedSection.Path : oldTree.FilePath; 235if (DocumentPathMap.TryGetValue(oldTree.FilePath, out var activeStatements))
FindUsages\AbstractFindUsagesService_FindImplementations.cs (1)
133if (location.IsInSource && !seenLocations.Add((location.SourceTree.FilePath, location.SourceSpan)))
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (5)
210=> syntaxTree1.FilePath != syntaxTree2.FilePath 211? StringComparer.OrdinalIgnoreCase.Compare(syntaxTree1.FilePath, syntaxTree2.FilePath) 276var filePath = groupSyntaxTree.FilePath;
MoveStaticMembers\MoveStaticMembersOptions.cs (1)
45FilePath = sourceLocation.SyntaxTree.FilePath;
src\roslyn\src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (1)
76var expectedFileHeader = fileHeaderTemplate.Replace("{fileName}", Path.GetFileName(tree.FilePath));
src\roslyn\src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (2)
148if (!PathUtilities.IsChildPath(projectDir, namespaceDeclaration.SyntaxTree.FilePath)) 157PathUtilities.GetDirectoryName(namespaceDeclaration.SyntaxTree.FilePath));
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (2)
495.Select(d => (d.SyntaxTree.FilePath, d.Span)) 576if (constructorSpans.Contains((node.SyntaxTree.FilePath, node.Span)))
SyncNamespaces\AbstractSyncNamespacesService.cs (1)
172.WhereAsArray(diagnostic => diagnostic.Location.SourceTree?.FilePath == document.FilePath);
Microsoft.CodeAnalysis.NetAnalyzers (2)
Microsoft.NetCore.Analyzers\Resources\MarkAssembliesWithNeutralResourcesLanguage.cs (1)
119return tree.FilePath?.IndexOf(Designer, StringComparison.OrdinalIgnoreCase) > 0;
Microsoft.NetCore.Analyzers\Runtime\PreferReadOnlySpanPropertiesOverReadOnlyArrayFieldsAnalyzer.cs (1)
160.OrderBy(location => location.SourceTree?.FilePath, StringComparer.Ordinal)
Microsoft.CodeAnalysis.Rebuild (1)
CompilationFactory.cs (1)
85.Select(st => (path: st.FilePath, text: st.GetText()))
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
51return IsGeneratedCodeFile(tree.FilePath) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (1)
22visitor.WriteString(symbol.DeclaringSyntaxReferences.FirstOrDefault()?.SyntaxTree.FilePath ?? "");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (2)
23visitor.WriteString(symbol.IsFileLocal ? symbol.DeclaringSyntaxReferences[0].SyntaxTree.FilePath : null); 183type.DeclaringSyntaxReferences[0].SyntaxTree.FilePath != filePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
457if (tree.FilePath == filePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
262WriteString(location.SourceTree.FilePath);
Microsoft.CodeAnalysis.Workspaces (22)
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (1)
118.OrderBy(d => d.Location.SourceTree!.FilePath)
FindSymbols\ReferenceLocation.cs (2)
136var thisPath = this.Location.SourceTree?.FilePath; 137var otherPath = other.Location.SourceTree?.FilePath;
Shared\Extensions\ProjectExtensions.cs (1)
38=> project.GetDocument(tree) ?? throw ISolutionExtensions.CreateDocumentNotFoundException(tree.FilePath);
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
51return IsGeneratedCodeFile(tree.FilePath) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (1)
22visitor.WriteString(symbol.DeclaringSyntaxReferences.FirstOrDefault()?.SyntaxTree.FilePath ?? "");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (2)
23visitor.WriteString(symbol.IsFileLocal ? symbol.DeclaringSyntaxReferences[0].SyntaxTree.FilePath : null); 183type.DeclaringSyntaxReferences[0].SyntaxTree.FilePath != filePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
457if (tree.FilePath == filePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
262WriteString(location.SourceTree.FilePath);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (4)
206afterSourceTree.FilePath == declarationList.FirstOrDefault()?.SyntaxTree.FilePath) 220beforeSourceTree.FilePath == declarationList.FirstOrDefault()?.SyntaxTree.FilePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
42var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath);
Workspace\Solution\ProjectState.cs (4)
429return GetOptionsForSourcePath(cache, tree.FilePath); 475return GetOptionsForSourcePath(cache, tree.FilePath); 564.GetValue(cancellationToken).GetOptionsForSourcePath(tree.FilePath); 580.GetValue(cancellationToken).GetOptionsForSourcePath(tree.FilePath);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (1)
388generatedSource.SyntaxTree.FilePath,
Workspace\Solution\SolutionCompilationState.SymbolToProjectId.cs (2)
91$"We should always be able to map a body symbol back to a document:\r\n{symbol.Kind}\r\n{symbol.Name}\r\n{syntaxTree.FilePath}\r\n{projectId}"); 102$"Syntax tree for a body symbol should map to the same project as the body symbol's assembly:\r\n{symbol.Kind}\r\n{symbol.Name}\r\n{syntaxTree.FilePath}\r\n{projectId}\r\n{documentId.ProjectId}");
Microsoft.Extensions.Configuration.Binder.SourceGeneration (5)
ConfigurationBindingGenerator.Suppressor.cs (3)
116if (!tree.FilePath.EndsWith("BindingExtensions.g.cs", System.StringComparison.Ordinal)) 187filePath = resolver?.NormalizePath(syntaxTree.FilePath, baseFilePath: null) ?? syntaxTree.FilePath;
Specs\InterceptorInfo.cs (2)
197return sourceReferenceResolver?.NormalizePath(operationSyntaxTree.FilePath, baseFilePath: null) ?? operationSyntaxTree.FilePath;
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Roslyn4.0.cs (1)
121if ((seen ??= new()).Add((diagnostic.Id, diagnostic.Location?.SourceSpan, diagnostic.Location?.SourceTree?.FilePath, diagnostic.GetMessage())))
Microsoft.Maui.Controls.BindingSourceGen (1)
BindingInvocationDescription.cs (1)
24 : new SourceCodeLocation(location.SourceTree.FilePath, location.SourceSpan, location.GetLineSpan().Span);
Roslyn.Diagnostics.Analyzers (11)
src\roslyn\src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (1)
51return IsGeneratedCodeFile(tree.FilePath) ||
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (1)
22visitor.WriteString(symbol.DeclaringSyntaxReferences.FirstOrDefault()?.SyntaxTree.FilePath ?? "");
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (2)
23visitor.WriteString(symbol.IsFileLocal ? symbol.DeclaringSyntaxReferences[0].SyntaxTree.FilePath : null); 183type.DeclaringSyntaxReferences[0].SyntaxTree.FilePath != filePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
457if (tree.FilePath == filePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
262WriteString(location.SourceTree.FilePath);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (4)
206afterSourceTree.FilePath == declarationList.FirstOrDefault()?.SyntaxTree.FilePath) 220beforeSourceTree.FilePath == declarationList.FirstOrDefault()?.SyntaxTree.FilePath)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
42var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath);
System.Text.Json.SourceGeneration (2)
JsonSourceGenerator.Parser.cs (2)
394string.Compare(attributeTree.FilePath, canonicalTree.FilePath, StringComparison.Ordinal) < 0)
System.Text.RegularExpressions.Generator (2)
UpgradeToGeneratedRegexCodeFixer.cs (2)
541callSites.Add((syntaxRef.SyntaxTree.FilePath ?? string.Empty, treeIndex, descendant.SpanStart)); 559string currentFilePath = nodeToFix.SyntaxTree.FilePath ?? string.Empty;