8 overrides of SyntaxTree
Microsoft.CodeAnalysis (1)
Syntax\TranslationSyntaxReference.cs (1)
29public sealed override SyntaxTree SyntaxTree
Microsoft.CodeAnalysis.CSharp (1)
Syntax\SimpleSyntaxReference.cs (1)
22public override SyntaxTree SyntaxTree
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DeclarationTests.cs (1)
898public override SyntaxTree SyntaxTree
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Workspace\LanguageServices\CSharpSyntaxTreeFactoryService.NodeSyntaxReference.cs (1)
21public override SyntaxTree SyntaxTree
Microsoft.CodeAnalysis.VisualBasic (1)
Syntax\SimpleSyntaxReference.vb (1)
23Public Overrides ReadOnly Property SyntaxTree As SyntaxTree
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSymbolDeclarationService.vb (1)
57Public Overrides ReadOnly Property SyntaxTree As SyntaxTree
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSymbolDeclarationService.vb (1)
57Public Overrides ReadOnly Property SyntaxTree As SyntaxTree
Workspace\LanguageServices\VisualBasicSyntaxTreeFactoryService.NodeSyntaxReference.vb (1)
18Public Overrides ReadOnly Property SyntaxTree As SyntaxTree
190 references to SyntaxTree
Microsoft.AspNetCore.Analyzers (1)
CompilationFeatureDetector.cs (1)
39var semanticModel = compilation.GetSemanticModel(syntaxReferences[j].SyntaxTree);
Microsoft.CodeAnalysis (14)
Compilation\Compilation.cs (1)
3537MarkImportDirectiveAsUsed(node.SyntaxTree, node.Span.Start);
Diagnostic\SourceLocation.cs (1)
49: this(syntaxRef.SyntaxTree, syntaxRef.Span)
DiagnosticAnalyzer\AnalysisScope.cs (2)
216return symbolEvent.Symbol.IsImplicitlyDeclared || symbolEvent.DeclaringSyntaxReferences.All(s => s.SyntaxTree == null); 254if (syntaxRef.SyntaxTree == filterTree)
DiagnosticAnalyzer\AnalyzerDriver.cs (5)
1887var model = compilation.GetSemanticModel(syntaxReference.SyntaxTree); 2287if (!IsGeneratedOrHiddenCodeLocation(declaringRef.SyntaxTree, declaringRef.Span, cancellationToken)) 2518if (analysisScope.FilterFileOpt != null && analysisScope.FilterFileOpt?.SourceTree != decl.SyntaxTree) 2523var isInGeneratedCode = isGeneratedCodeSymbol || IsGeneratedOrHiddenCodeLocation(decl.SyntaxTree, decl.Span, cancellationToken); 2586GetOrCreateSemanticModel(decl.SyntaxTree, symbolEvent.Compilation);
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
1408if (syntaxRef.SyntaxTree == diagnostic.Location.SourceTree)
SourceGeneration\Nodes\SyntaxValueProvider_ForAttributeWithMetadataName.cs (1)
163if (attribute.ApplicationSyntaxReference?.SyntaxTree == targetSyntaxTree &&
Syntax\SyntaxReference.cs (1)
52return this.SyntaxTree.GetLocation(this.Span);
Syntax\TranslationSyntaxReference.cs (2)
31get { return _reference.SyntaxTree; } 37Debug.Assert(node.SyntaxTree == _reference.SyntaxTree);
Microsoft.CodeAnalysis.CodeStyle (6)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
564r => r.SyntaxTree == diagnosticLocation.SourceTree && r.Span.Contains(diagnosticLocation.SourceSpan));
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
194if (!namedType.DeclaringSyntaxReferences.Select(d => d.SyntaxTree).Distinct().Any(tree =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (1)
22visitor.WriteString(symbol.DeclaringSyntaxReferences.FirstOrDefault()?.SyntaxTree.FilePath ?? "");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (1)
107if (reference.SyntaxTree == syntaxTree)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (2)
23? symbol.DeclaringSyntaxReferences[0].SyntaxTree.FilePath 182type.DeclaringSyntaxReferences[0].SyntaxTree.FilePath != filePath)
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
61declarationReferences.GroupBy(reference => solution.GetDocumentId(reference.SyntaxTree)!))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
190declaration = await SelectFirstOrDefaultAsync(declarations.Where(r => r.SyntaxTree == location.SourceTree), node => true, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp (45)
Binder\Binder_Initializers.cs (3)
104binderFactory = compilation.GetBinderFactory(syntaxRef.SyntaxTree); 126binderFactory = compilation.GetBinderFactory(syntaxRef.SyntaxTree); 194var syntaxTree = syntaxRef.SyntaxTree;
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1254if (primaryConstructor.SyntaxRef.SyntaxTree == memberSyntax.SyntaxTree &&
Binder\WithExternAndUsingAliasesBinder.cs (1)
180if (declaration.HasGlobalUsings && compilationUnit.SyntaxTree != declaration.SyntaxReference.SyntaxTree)
Compilation\CSharpCompilation.cs (3)
3101if (singleDeclaration.SyntaxReference.SyntaxTree == tree) 4557var comparison = CompareSyntaxTreeOrdering(loc1.SyntaxTree, loc2.SyntaxTree);
Compilation\CSharpSemanticModel.cs (1)
5239&& primaryConstructor.SyntaxRef.SyntaxTree == node.SyntaxTree
Compiler\ClsComplianceChecker.cs (2)
663else if (_filterTree == null || (syntaxRef != null && syntaxRef.SyntaxTree == _filterTree)) 665System.Diagnostics.Debug.Assert(syntaxRef.SyntaxTree.HasCompilationUnitRoot);
Compiler\DocumentationCommentCompiler.cs (1)
697DocumentationMode currDocumentationMode = reference.SyntaxTree.Options.DocumentationMode;
Declarations\SingleTypeDeclaration.cs (2)
255if ((object)thisDecl.SyntaxReference.SyntaxTree != otherDecl.SyntaxReference.SyntaxTree
Symbols\LexicalSortKey.cs (1)
68: this(syntaxRef.SyntaxTree, syntaxRef.Span.Start, compilation)
Symbols\Source\LocalFunctionSymbol.cs (1)
398var diagnosticInfo = MessageID.IDS_FeatureLocalFunctionAttributes.GetFeatureAvailabilityDiagnosticInfo((CSharpParseOptions)syntaxReferenceOpt.SyntaxTree.Options);
Symbols\Source\SourceDestructorSymbol.cs (1)
84var bodyBinder = this.DeclaringCompilation.GetBinderFactory(syntaxReferenceOpt.SyntaxTree).GetBinder(syntax, syntax, this);
Symbols\Source\SourceEventSymbol.cs (1)
425get { return _syntaxRef.SyntaxTree; }
Symbols\Source\SourceFieldSymbol.cs (2)
193return _syntaxReference.SyntaxTree; 217=> _syntaxReference.SyntaxTree.GetLocation(_locationSpan);
Symbols\Source\SourceMemberContainerSymbol.cs (9)
1024if (syntaxRef.SyntaxTree == tree && 1102if (tree == syntaxRef.SyntaxTree) 1174group[0].Syntax.SyntaxTree == tree && 1879var tree = declaration.Declarations[0].SyntaxReference.SyntaxTree; 2793(primaryConstructor.SyntaxRef.SyntaxTree != whereFoundField.SyntaxTree || primaryConstructor.SyntaxRef.Span != whereFoundField.Span)) 3091declaredMembers.DeclarationWithParameters.SyntaxTree == declaredMembers.InstanceInitializers[insertAt][0].Syntax.SyntaxTree && 3099Debug.Assert(insertedInitializers[insertedInitializers.Count - 1].Syntax.SyntaxTree == declaredInitializers[0].Syntax.SyntaxTree); 3113Debug.Assert(!declaredMembers.InstanceInitializers.Any(g => declaredMembers.DeclarationWithParameters.SyntaxTree == g[0].Syntax.SyntaxTree &&
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
97return this.syntaxReferenceOpt == null ? null : this.syntaxReferenceOpt.SyntaxTree;
Symbols\Source\SourceNamedTypeSymbol.cs (3)
153var syntaxTree = syntaxRef.SyntaxTree; 334var binderFactory = this.DeclaringCompilation.GetBinderFactory(syntaxRef.SyntaxTree); 415var binderFactory = this.DeclaringCompilation.GetBinderFactory(syntaxRef.SyntaxTree);
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (5)
74if (declarationSyntaxRef.SyntaxTree != declarationSyntax.SyntaxTree) 879uniqueUsings.AddAll(globalUsingNamespacesOrTypes.Where(n => n.UsingDirectiveReference?.SyntaxTree != tree).Select(n => n.NamespaceOrType)); 977if (alias.UsingDirectiveReference!.SyntaxTree != declarationSyntax.SyntaxTree) 1003if (@using.UsingDirectiveReference!.SyntaxTree != declarationSyntax.SyntaxTree)
Symbols\Source\SourceNamespaceSymbol.cs (1)
469if (declarationSyntaxRef.SyntaxTree != tree)
Symbols\Source\SourceNamespaceSymbol_Completion.cs (1)
40if (locationOpt == null || locationOpt.SourceTree == declaration.SyntaxReference.SyntaxTree)
Symbols\Source\SourcePropertySymbolBase.cs (1)
851return _syntaxRef.SyntaxTree;
Symbols\Symbol.cs (1)
954=> syntaxRef.SyntaxTree == tree &&
Symbols\SymbolDistinguisher.cs (1)
168var tree = syntaxReferences[0].SyntaxTree;
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (1)
172if (attributeDeclarationSyntax.SyntaxTree == SyntaxRef.SyntaxTree &&
Symbols\Synthesized\SynthesizedSimpleProgramEntryPointSymbol.cs (1)
256if (_declaration.SyntaxReference.SyntaxTree == tree)
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (2)
266var styleOption = options.GetCSharpAnalyzerOptions(reference.SyntaxTree).PreferPrimaryConstructors; 268|| diagnosticAnalyzer.ShouldSkipAnalysis(reference.SyntaxTree, context.Options, context.Compilation.Options, styleOption.Notification, cancellationToken))
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
102var fieldSyntaxTree = fieldSyntaxReference.SyntaxTree;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
376var semanticModel = compilation.GetSemanticModel(syntaxReference.SyntaxTree);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
105.Select(r => solution.GetRequiredDocument(r.SyntaxTree))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (14)
Semantics\PrimaryConstructorTests.cs (9)
3802Assert.Same(literal.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree); 3828Assert.Same(equalsValue.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree); 3846Assert.Same(initializer.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree); 3877Assert.Same(baseType.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree); 3904Assert.Same(@class.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree); 5291Assert.Same(literal.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree); 5309Assert.Same(equalsValue.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree); 5327Assert.Same(initializer.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree); 5356Assert.Same(record.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
Semantics\RecordTests.cs (5)
26287Assert.Same(literal.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree); 26313Assert.Same(equalsValue.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree); 26331Assert.Same(initializer.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree); 26362Assert.Same(baseType.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree); 26385Assert.Same(record.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
Microsoft.CodeAnalysis.CSharp.Features (4)
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (1)
275foreach (var group in parameter.ContainingType.DeclaringSyntaxReferences.GroupBy(r => r.SyntaxTree))
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (2)
266var styleOption = options.GetCSharpAnalyzerOptions(reference.SyntaxTree).PreferPrimaryConstructors; 268|| diagnosticAnalyzer.ShouldSkipAnalysis(reference.SyntaxTree, context.Options, context.Compilation.Options, styleOption.Notification, cancellationToken))
src\Analyzers\CSharp\Analyzers\UseSystemThreadingLock\CSharpUseSystemThreadingLockDiagnosticAnalyzer.cs (1)
102var fieldSyntaxTree = fieldSyntaxReference.SyntaxTree;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\RecordStructTests.cs (4)
5990Assert.Same(literal.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree); 6008Assert.Same(equalsValue.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree); 6026Assert.Same(initializer.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree); 6055Assert.Same(record.SyntaxTree, context.ContainingSymbol!.DeclaringSyntaxReferences.Single().SyntaxTree);
Semantics\TopLevelStatementsTests.cs (2)
6455Assert.Same(globalStatement.SyntaxTree, context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree); 6721Assert.Same(context.ContainingSymbol.DeclaringSyntaxReferences.Single().SyntaxTree, context.Operation.Syntax.SyntaxTree);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
376var semanticModel = compilation.GetSemanticModel(syntaxReference.SyntaxTree);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
105.Select(r => solution.GetRequiredDocument(r.SyntaxTree))
Microsoft.CodeAnalysis.EditorFeatures (1)
Navigation\AbstractDefinitionLocationService.cs (1)
133if (symbol.DeclaringSyntaxReferences is not [{ SyntaxTree: { } definitionTree, Span: var definitionSpan }])
Microsoft.CodeAnalysis.Features (10)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Attribute.cs (1)
50public override SyntaxTree SyntaxTreeToModify => _attribute.ApplicationSyntaxReference.SyntaxTree;
EncapsulateField\AbstractEncapsulateFieldService.cs (2)
178document = document.WithSyntaxRoot(fieldDeclaration.SyntaxTree.GetRoot(cancellationToken).ReplaceNode(fieldDeclaration.GetSyntax(cancellationToken), 329contextLocation: fieldDeclaration.SyntaxTree.GetLocation(fieldDeclaration.Span)));
MoveStaticMembers\MoveStaticMembersOptions.cs (2)
42RoslynDebug.AssertNotNull(sourceLocation.SyntaxTree); 45FileName = sourceLocation.SyntaxTree.FilePath;
NavigationBar\AbstractNavigationBarItemService.cs (1)
80Location.Create(allReferences.First().SyntaxTree, allReferences.First().Span);
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
564r => r.SyntaxTree == diagnosticLocation.SourceTree && r.Span.Contains(diagnosticLocation.SourceSpan));
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
194if (!namedType.DeclaringSyntaxReferences.Select(d => d.SyntaxTree).Distinct().Any(tree =>
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
61declarationReferences.GroupBy(reference => solution.GetDocumentId(reference.SyntaxTree)!))
ValueTracking\ValueTracker.cs (1)
48var location = Location.Create(syntaxRef.SyntaxTree, syntaxRef.Span);
Microsoft.CodeAnalysis.Test.Utilities (3)
Diagnostics\CommonDiagnosticAnalyzers.cs (3)
2778ReportDiagnostics("RegisterOperationBlockAction", operationBlockContext.OwningSymbol.DeclaringSyntaxReferences[0].SyntaxTree, operationBlockContext.OwningSymbol, operationBlockContext.ReportDiagnostic)); 2789ReportDiagnostics("RegisterOperationBlockEndAction", operationBlockEndContext.OwningSymbol.DeclaringSyntaxReferences[0].SyntaxTree, operationBlockEndContext.OwningSymbol, operationBlockEndContext.ReportDiagnostic)); 2824var trees = symbol.DeclaringSyntaxReferences.Select(syntaxRef => syntaxRef.SyntaxTree).Distinct();
Microsoft.CodeAnalysis.VisualBasic (49)
Compilation\ClsComplianceChecker.vb (2)
401ElseIf _filterTree Is Nothing OrElse (syntaxRef IsNot Nothing AndAlso syntaxRef.SyntaxTree Is _filterTree) Then 402Debug.Assert(syntaxRef.SyntaxTree.HasCompilationUnitRoot)
Declarations\SingleTypeDeclaration.vb (1)
110Return SyntaxReference.SyntaxTree.GetEmbeddedKind()
Symbols\ConstantValueUtils.vb (1)
33Dim binder As Binder = BinderBuilder.CreateBinderForType(containingModule, equalsValueOrAsNewNodeRef.SyntaxTree, field.ContainingSourceType)
Symbols\LexicalSortKey.vb (4)
101Me.New(syntaxRef.SyntaxTree, syntaxRef.Span.Start, compilation) 200If first.SyntaxTree IsNot Nothing AndAlso first.SyntaxTree Is second.SyntaxTree Then
Symbols\Source\ImplicitNamedTypeSymbol.vb (1)
179Dim binder As Binder = BinderBuilder.CreateBinderForType(ContainingSourceModule, syntaxRef.SyntaxTree, Me)
Symbols\Source\SourceComplexParameterSymbol.vb (1)
159_syntaxRef.SyntaxTree,
Symbols\Source\SourceEventSymbol.vb (3)
154Dim binder = BinderBuilder.CreateBinderForType(ContainingSourceModule, _syntaxRef.SyntaxTree, _containingType) 726Dim syntaxTree = _syntaxRef.SyntaxTree 742Dim binder = BinderBuilder.CreateBinderForType(ContainingSourceModule, _syntaxRef.SyntaxTree, _containingType)
Symbols\Source\SourceFieldSymbol.vb (2)
85Return _syntaxRef.SyntaxTree 866Dim syntaxTree = syntaxRef.SyntaxTree
Symbols\Source\SourceMemberContainerTypeSymbol.vb (2)
258Dim refKind = ref.SyntaxTree.GetEmbeddedKind() 3247If tree Is syntaxRef.SyntaxTree Then
Symbols\Source\SourceMethodSymbol.vb (3)
778Return m_syntaxReferenceOpt.SyntaxTree 853Dim syntaxTree = syntaxRef.SyntaxTree 1160syntaxTree = m_syntaxReferenceOpt.SyntaxTree
Symbols\Source\SourceModuleSymbol.vb (1)
1182If syntaxRef.SyntaxTree.IsMyTemplate Then
Symbols\Source\SourceNamedTypeSymbol.vb (8)
177Dim binder As Binder = BinderBuilder.CreateBinderForType(ContainingSourceModule, syntaxRef.SyntaxTree, Me) 219CheckDeclarationPart(syntaxRef.SyntaxTree, syntaxRef.GetVisualBasicSyntax(), firstNode, foundPartial, diagnostics) 796Dim tree = syntaxRef.SyntaxTree 919Dim tree = syntaxRef.SyntaxTree 1280MakeDeclaredBaseInPart(syntaxRef.SyntaxTree, syntaxRef.GetVisualBasicSyntax(), baseType, basesBeingResolved, diagnostics) 1300MakeDeclaredInterfacesInPart(syntaxRef.SyntaxTree, syntaxRef.GetVisualBasicSyntax(), interfaces, basesBeingResolved, diagnostics) 1318Dim binder As Binder = CreateLocationSpecificBinderForType(part.SyntaxTree, BindingLocation.BaseTypes) 1762Dim tree = blockRef.SyntaxTree
Symbols\Source\SourceNamedTypeSymbol_GroupClass.vb (1)
323Dim binder As Binder = BinderBuilder.CreateBinderForType(ContainingSourceModule, syntaxRef.SyntaxTree, Me)
Symbols\Source\SourceNamespaceSymbol.vb (8)
171Dim refKind = ref.SyntaxTree.GetEmbeddedKind() 302If reference IsNot Nothing AndAlso Not reference.SyntaxTree.IsEmbeddedOrMyTemplateTree() Then 319If reference IsNot Nothing AndAlso reference.SyntaxTree Is tree Then 320If Not reference.SyntaxTree.IsEmbeddedOrMyTemplateTree() Then 375If tree IsNot Nothing AndAlso syntaxRef.SyntaxTree IsNot tree Then 379Dim currentTree = syntaxRef.SyntaxTree 470declaration.SyntaxReference.SyntaxTree.FilePath IsNot Nothing Then 472Dim otherPath = declaration.SyntaxReference.SyntaxTree.FilePath
Symbols\Source\SourcePropertySymbol.vb (3)
340Dim binder = BinderBuilder.CreateBinderForType(DirectCast(ContainingModule, SourceModuleSymbol), _syntaxRef.SyntaxTree, _containingType) 1066Dim binder = BinderBuilder.CreateBinderForType(DirectCast(ContainingModule, SourceModuleSymbol), _syntaxRef.SyntaxTree, _containingType) 1224Return _syntaxRef.SyntaxTree
Symbols\Source\SourceTypeParameterSymbol.vb (1)
168Dim syntaxTree = syntaxRef.SyntaxTree
Symbols\Source\SynthesizedMyGroupCollectionPropertyAccessorSymbol.vb (1)
101Dim typeBinder As Binder = BinderBuilder.CreateBinderForType(containingType.ContainingSourceModule, PropertyOrEvent.AttributeSyntax.SyntaxTree, containingType)
Symbols\Symbol.vb (3)
417Dim tree = reference.SyntaxTree 428Dim tree = reference.SyntaxTree 909If syntaxRef.SyntaxTree Is tree AndAlso
Symbols\SynthesizedSymbols\SynthesizedEventDelegateSymbol.vb (1)
57Dim binder As Binder = BinderBuilder.CreateBinderForType(sourceModule, _syntaxRef.SyntaxTree, Me.ContainingType)
VisualBasicExtensions.vb (2)
224Dim tree = TryCast(syntaxReference.SyntaxTree, VisualBasicSyntaxTree) 225If syntaxReference.SyntaxTree IsNot Nothing Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSymbolDeclarationService.vb (1)
59Return _reference.SyntaxTree
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSymbolDeclarationService.vb (1)
59Return _reference.SyntaxTree
Microsoft.CodeAnalysis.Workspaces (10)
FindSymbols\SymbolFinder.cs (2)
197var originalDocument = solution.GetDocument(location.SyntaxTree); 207var originalRoot = await location.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (2)
52var documentForLocation = document.Project.GetDocument(syntaxRef.SyntaxTree); 54var root = await syntaxRef.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
ReassignedVariable\AbstractReassignedVariableService.cs (1)
198foreach (var group in containingType.DeclaringSyntaxReferences.GroupBy(r => r.SyntaxTree))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.AliasSymbolKey.cs (1)
22visitor.WriteString(symbol.DeclaringSyntaxReferences.FirstOrDefault()?.SyntaxTree.FilePath ?? "");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (1)
107if (reference.SyntaxTree == syntaxTree)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.NamedTypeSymbolKey.cs (2)
23? symbol.DeclaringSyntaxReferences[0].SyntaxTree.FilePath 182type.DeclaringSyntaxReferences[0].SyntaxTree.FilePath != filePath)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
190declaration = await SelectFirstOrDefaultAsync(declarations.Where(r => r.SyntaxTree == location.SourceTree), node => true, cancellationToken).ConfigureAwait(false);
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\CustomMarshallerAttributeFixer.cs (1)
183attr.ApplicationSyntaxReference.SyntaxTree == locationInAttribute.SourceTree
Microsoft.Interop.SourceGeneration (6)
DiagnosticExtensions.cs (4)
36? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span) 50? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span) 140? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span) 154? syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span)
TypePositionInfo.cs (2)
130outAttributeLocation = attr.ApplicationSyntaxReference.SyntaxTree.GetLocation(attr.ApplicationSyntaxReference.Span); 135inAttributeLocation = attr.ApplicationSyntaxReference.SyntaxTree.GetLocation(attr.ApplicationSyntaxReference.Span);
Microsoft.VisualStudio.LanguageServices (4)
CallHierarchy\Finders\ImplementerFinder.cs (1)
44var sourceLocations = implementation.DeclaringSyntaxReferences.Select(d => project.Solution.GetDocument(d.SyntaxTree)).WhereNotNull();
CallHierarchy\Finders\OverridingMemberFinder.cs (1)
40var sourceLocations = @override.DeclaringSyntaxReferences.Select(d => project.Solution.GetDocument(d.SyntaxTree)).WhereNotNull();
Progression\GraphQueries\CallsGraphQuery.cs (1)
48var semanticModel = await solution.GetDocument(reference.SyntaxTree).GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Venus\ContainedLanguageCodeSupport.cs (1)
66var typeNode = type.DeclaringSyntaxReferences.Where(r => r.SyntaxTree == tree).Select(r => r.GetSyntax(cancellationToken)).First();
Mvc.Api.Analyzers.Test (4)
ActualApiResponseMetadataFactoryTest.cs (4)
74var syntaxTree = returnType.DeclaringSyntaxReferences[0].SyntaxTree; 373var syntaxTree = method.DeclaringSyntaxReferences[0].SyntaxTree; 391var syntaxTree = controllerType.DeclaringSyntaxReferences[0].SyntaxTree; 410var syntaxTree = returnType.DeclaringSyntaxReferences[0].SyntaxTree;
System.Text.Json.SourceGeneration (1)
Helpers\RoslynExtensions.cs (1)
34return reference?.SyntaxTree.GetLocation(reference.Span);