1 instantiation of SyntaxTreeAnalysisContext
Microsoft.CodeAnalysis (1)
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
582var context = new SyntaxTreeAnalysisContext(tree, AnalyzerOptions, diagReporter.AddDiagnosticAction, isSupportedDiagnostic, Compilation, filterSpan, isGeneratedCode, cancellationToken);
96 references to SyntaxTreeAnalysisContext
Microsoft.CodeAnalysis (9)
DiagnosticAnalyzer\AnalyzerExecutor.cs (1)
582var context = new SyntaxTreeAnalysisContext(tree, AnalyzerOptions, diagReporter.AddDiagnosticAction, isSupportedDiagnostic, Compilation, filterSpan, isGeneratedCode, cancellationToken);
DiagnosticAnalyzer\CompilerDiagnosticAnalyzer.CompilationAnalyzer.cs (1)
32public void AnalyzeSyntaxTree(SyntaxTreeAnalysisContext context)
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (3)
120public abstract void RegisterSyntaxTreeAction(Action<SyntaxTreeAnalysisContext> action); 436public abstract void RegisterSyntaxTreeAction(Action<SyntaxTreeAnalysisContext> action); 1505/// A syntax tree action can use a <see cref="SyntaxTreeAnalysisContext"/> to report <see cref="Diagnostic"/>s about a <see cref="SyntaxTree"/> for a code document.
DiagnosticAnalyzer\DiagnosticAnalyzerAction.cs (2)
141public Action<SyntaxTreeAnalysisContext> Action { get; } 143public SyntaxTreeAnalyzerAction(Action<SyntaxTreeAnalysisContext> action, DiagnosticAnalyzer analyzer)
DiagnosticAnalyzer\DiagnosticStartAnalysisScope.cs (2)
42public override void RegisterSyntaxTreeAction(Action<SyntaxTreeAnalysisContext> action) 147public override void RegisterSyntaxTreeAction(Action<SyntaxTreeAnalysisContext> action)
Microsoft.CodeAnalysis.CodeStyle (19)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
96protected bool ShouldSkipAnalysis(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions, NotificationOption2? notification)
src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (2)
30private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 42protected abstract void ProcessCompilationUnit(SyntaxTreeAnalysisContext context, CodeStyleOption2<AccessibilityModifiersRequired> option, TCompilationUnitSyntax compilationUnitSyntax);
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (1)
42private void HandleSyntaxTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (1)
41private void AnalyzeSyntaxTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (3)
41private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 50private void Recurse(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SyntaxNode node, CancellationToken cancellationToken) 68private void ProcessBlockLikeStatement(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SyntaxNode block)
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (3)
36private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 46SyntaxTreeAnalysisContext context, 69private void CheckToken(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SyntaxToken token)
src\Analyzers\Core\Analyzers\OrderModifiers\AbstractOrderModifiersDiagnosticAnalyzer.cs (4)
40protected abstract CodeStyleOption2<string> GetPreferredOrderStyle(SyntaxTreeAnalysisContext context); 42private void AnalyzeSyntaxTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 61SyntaxTreeAnalysisContext context, 67SyntaxTreeAnalysisContext context,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalysisContextExtensions.cs (4)
20/// - <see cref="SyntaxTreeAnalysisContext.FilterSpan"/> is <see langword="null"/> (we are analyzing the entire tree) 22/// - <paramref name="span"/> intersects with <see cref="SyntaxTreeAnalysisContext.FilterSpan"/>. 24public static bool ShouldAnalyzeSpan(this SyntaxTreeAnalysisContext context, TextSpan span) 150public static SyntaxNode GetAnalysisRoot(this SyntaxTreeAnalysisContext context, bool findInTrivia, bool getInnermostNodeForTie = false)
Microsoft.CodeAnalysis.CSharp.CodeStyle (18)
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiersDiagnosticAnalyzer.cs (3)
21SyntaxTreeAnalysisContext context, 28SyntaxTreeAnalysisContext context, 37SyntaxTreeAnalysisContext context,
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (3)
35private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 44private void Recurse(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SyntaxNode node) 62SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, ArrowExpressionClauseSyntax arrowExpressionClause)
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (3)
35private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 45private void Recurse(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, ArrayBuilder<SyntaxNode> stack) 78private void ProcessToken(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SourceText text, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (3)
36private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 45private void Recurse(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SyntaxNode node) 67SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, ConstructorInitializerSyntax initializer)
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (3)
32private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 41private void Recurse(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SyntaxNode node) 68private bool CheckStatementSyntax(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, StatementSyntax statement)
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersDiagnosticAnalyzer.cs (2)
26protected override CodeStyleOption2<string> GetPreferredOrderStyle(SyntaxTreeAnalysisContext context) 30SyntaxTreeAnalysisContext context,
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (1)
49SyntaxTreeAnalysisContext context)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (2)
235public static void AnalyzeSyntaxTree(SyntaxTreeAnalysisContext context) 354private void Analyze(SyntaxTreeAnalysisContext context)
Microsoft.CodeAnalysis.CSharp.Features (18)
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiersDiagnosticAnalyzer.cs (3)
21SyntaxTreeAnalysisContext context, 28SyntaxTreeAnalysisContext context, 37SyntaxTreeAnalysisContext context,
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (3)
35private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 44private void Recurse(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SyntaxNode node) 62SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, ArrowExpressionClauseSyntax arrowExpressionClause)
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (3)
35private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 45private void Recurse(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, ArrayBuilder<SyntaxNode> stack) 78private void ProcessToken(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SourceText text, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (3)
36private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 45private void Recurse(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SyntaxNode node) 67SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, ConstructorInitializerSyntax initializer)
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (3)
32private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 41private void Recurse(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SyntaxNode node) 68private bool CheckStatementSyntax(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, StatementSyntax statement)
src\Analyzers\CSharp\Analyzers\OrderModifiers\CSharpOrderModifiersDiagnosticAnalyzer.cs (2)
26protected override CodeStyleOption2<string> GetPreferredOrderStyle(SyntaxTreeAnalysisContext context) 30SyntaxTreeAnalysisContext context,
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveRedundantNullableDirectiveDiagnosticAnalyzer.cs (1)
49SyntaxTreeAnalysisContext context)
Microsoft.CodeAnalysis.Features (15)
src\Analyzers\Core\Analyzers\AbstractBuiltInCodeStyleDiagnosticAnalyzer_Core.cs (1)
96protected bool ShouldSkipAnalysis(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions, NotificationOption2? notification)
src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiersDiagnosticAnalyzer.cs (2)
30private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 42protected abstract void ProcessCompilationUnit(SyntaxTreeAnalysisContext context, CodeStyleOption2<AccessibilityModifiersRequired> option, TCompilationUnitSyntax compilationUnitSyntax);
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderDiagnosticAnalyzer.cs (1)
42private void HandleSyntaxTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (1)
41private void AnalyzeSyntaxTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions)
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (3)
41private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 50private void Recurse(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SyntaxNode node, CancellationToken cancellationToken) 68private void ProcessBlockLikeStatement(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SyntaxNode block)
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (3)
36private void AnalyzeTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 46SyntaxTreeAnalysisContext context, 69private void CheckToken(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SyntaxToken token)
src\Analyzers\Core\Analyzers\OrderModifiers\AbstractOrderModifiersDiagnosticAnalyzer.cs (4)
40protected abstract CodeStyleOption2<string> GetPreferredOrderStyle(SyntaxTreeAnalysisContext context); 42private void AnalyzeSyntaxTree(SyntaxTreeAnalysisContext context, CompilationOptions compilationOptions) 61SyntaxTreeAnalysisContext context, 67SyntaxTreeAnalysisContext context,
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\TestDiagnosticAnalyzer.cs (1)
86private void AnalyzeSyntaxTree(SyntaxTreeAnalysisContext context)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (5)
src\Analyzers\VisualBasic\Analyzers\AddAccessibilityModifiers\VisualBasicAddAccessibilityModifiersDiagnosticAnalyzer.vb (3)
18context As SyntaxTreeAnalysisContext, 26context As SyntaxTreeAnalysisContext, 36context As SyntaxTreeAnalysisContext,
src\Analyzers\VisualBasic\Analyzers\OrderModifiers\VisualBasicOrderModifiersDiagnosticAnalyzer.vb (2)
23Protected Overrides Function GetPreferredOrderStyle(context As SyntaxTreeAnalysisContext) As CodeStyleOption2(Of String) 28context As SyntaxTreeAnalysisContext,
Microsoft.CodeAnalysis.VisualBasic.Features (5)
src\Analyzers\VisualBasic\Analyzers\AddAccessibilityModifiers\VisualBasicAddAccessibilityModifiersDiagnosticAnalyzer.vb (3)
18context As SyntaxTreeAnalysisContext, 26context As SyntaxTreeAnalysisContext, 36context As SyntaxTreeAnalysisContext,
src\Analyzers\VisualBasic\Analyzers\OrderModifiers\VisualBasicOrderModifiersDiagnosticAnalyzer.vb (2)
23Protected Overrides Function GetPreferredOrderStyle(context As SyntaxTreeAnalysisContext) As CodeStyleOption2(Of String) 28context As SyntaxTreeAnalysisContext,
Microsoft.CodeAnalysis.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalysisContextExtensions.cs (4)
20/// - <see cref="SyntaxTreeAnalysisContext.FilterSpan"/> is <see langword="null"/> (we are analyzing the entire tree) 22/// - <paramref name="span"/> intersects with <see cref="SyntaxTreeAnalysisContext.FilterSpan"/>. 24public static bool ShouldAnalyzeSpan(this SyntaxTreeAnalysisContext context, TextSpan span) 150public static SyntaxNode GetAnalysisRoot(this SyntaxTreeAnalysisContext context, bool findInTrivia, bool getInnermostNodeForTie = false)