1 instantiation of DeclarationInfo
Microsoft.CodeAnalysis (1)
src\Compilers\Core\AnalyzerDriver\DeclarationComputer.cs (1)
24
return new
DeclarationInfo
(node, codeBlocks, declaredSymbol);
20 references to DeclarationInfo
Microsoft.CodeAnalysis (20)
Compilation\SemanticModel.cs (5)
875
/// Gets the <see cref="
DeclarationInfo
"/> for all the declarations whose span overlaps with the given <paramref name="span"/>.
878
/// <param name="getSymbol">Flag indicating whether <see cref="
DeclarationInfo
.DeclaredSymbol"/> should be computed for the returned declaration infos.
879
/// If false, then <see cref="
DeclarationInfo
.DeclaredSymbol"/> is always null.</param>
882
internal abstract void ComputeDeclarationsInSpan(TextSpan span, bool getSymbol, ArrayBuilder<
DeclarationInfo
> builder, CancellationToken cancellationToken);
887
internal abstract void ComputeDeclarationsInNode(SyntaxNode node, ISymbol associatedSymbol, bool getSymbol, ArrayBuilder<
DeclarationInfo
> builder, CancellationToken cancellationToken, int? levelsToCompute = null);
DiagnosticAnalyzer\AnalyzerDriver.cs (8)
1328
var declarationInfoBuilder = ArrayBuilder<
DeclarationInfo
>.GetInstance();
1332
foreach (
var
declarationInfo in declarationInfoBuilder)
2544
var builder = ArrayBuilder<
DeclarationInfo
>.GetInstance();
2548
ImmutableArray<
DeclarationInfo
> declarationInfos = builder.ToImmutableAndFree();
2556
private static void ComputeDeclarationsInNode(SemanticModel semanticModel, ISymbol declaredSymbol, SyntaxNode declaringReferenceSyntax, SyntaxNode topmostNodeForAnalysis, ArrayBuilder<
DeclarationInfo
> builder, CancellationToken cancellationToken)
2670
foreach (
var
declInNode in declarationAnalysisData.DeclarationsInNode)
2842
ImmutableArray<
DeclarationInfo
> declarationsInNode,
2851
foreach (
var
declInNode in declarationsInNode)
DiagnosticAnalyzer\AnalyzerDriver.DeclarationAnalysisData.cs (2)
27
public readonly ImmutableArray<
DeclarationInfo
> DeclarationsInNode;
42
ImmutableArray<
DeclarationInfo
> declarationsInNodeBuilder,
src\Compilers\Core\AnalyzerDriver\DeclarationComputer.cs (5)
15
internal static
DeclarationInfo
GetDeclarationInfo(SemanticModel model, SyntaxNode node, bool getSymbol, IEnumerable<SyntaxNode>? executableCodeBlocks, CancellationToken cancellationToken)
21
internal static
DeclarationInfo
GetDeclarationInfo(SyntaxNode node, ISymbol? declaredSymbol, IEnumerable<SyntaxNode>? executableCodeBlocks)
27
internal static
DeclarationInfo
GetDeclarationInfo(SemanticModel model, SyntaxNode node, bool getSymbol, CancellationToken cancellationToken)
32
internal static
DeclarationInfo
GetDeclarationInfo(SemanticModel model, SyntaxNode node, bool getSymbol, SyntaxNode executableCodeBlock, CancellationToken cancellationToken)
37
internal static
DeclarationInfo
GetDeclarationInfo(SemanticModel model, SyntaxNode node, bool getSymbol, CancellationToken cancellationToken, params SyntaxNode[] executableCodeBlocks)