2 instantiations of SymbolAnalysisContext
Microsoft.CodeAnalysis (2)
DiagnosticAnalyzer\AnalyzerExecutor.cs (2)
386var context = new SymbolAnalysisContext(symbol, Compilation, AnalyzerOptions, addDiagnostic, 488var context = new SymbolAnalysisContext(symbol, Compilation, AnalyzerOptions, addDiagnostic,
156 references to SymbolAnalysisContext
ILLink.RoslynAnalyzer (15)
DynamicallyAccessedMembersAnalyzer.cs (5)
150 static void VerifyMemberOnlyApplyToTypesOrStrings (SymbolAnalysisContext context, ISymbol member) 169 static void VerifyDamOnDerivedAndBaseMethodsMatch (SymbolAnalysisContext context, IMethodSymbol methodSymbol) 177 static void VerifyDamOnMethodsMatch (SymbolAnalysisContext context, IMethodSymbol overrideMethod, IMethodSymbol baseMethod, ISymbol? origin = null) 262 static void VerifyDamOnInterfaceAndImplementationMethodsMatch (SymbolAnalysisContext context, INamedTypeSymbol type) 279 static void VerifyDamOnPropertyAndAccessorMatch (SymbolAnalysisContext context, IMethodSymbol methodSymbol)
RequiresAnalyzerBase.cs (7)
38 private protected virtual ImmutableArray<(Action<SymbolAnalysisContext> Action, SymbolKind[] SymbolKind)> ExtraSymbolActions { get; } = ImmutableArray<(Action<SymbolAnalysisContext> Action, SymbolKind[] SymbolKind)>.Empty; 125 SymbolAnalysisContext symbolAnalysisContext, 133 SymbolAnalysisContext symbolAnalysisContext, 241 private void ReportRequiresOnStaticCtorDiagnostic (SymbolAnalysisContext symbolAnalysisContext, IMethodSymbol ctor) 249 private void ReportRequiresOnEntryPointDiagnostic (SymbolAnalysisContext symbolAnalysisContext, IMethodSymbol entryPoint) 257 private void ReportMismatchInAttributesDiagnostic (SymbolAnalysisContext symbolAnalysisContext, ISymbol member, ISymbol baseMember, bool isInterface = false, ISymbol? origin = null)
RequiresUnreferencedCodeAnalyzer.cs (3)
30 private Action<SymbolAnalysisContext> typeDerivesFromRucBase { 97 private protected override ImmutableArray<(Action<SymbolAnalysisContext> Action, SymbolKind[] SymbolKind)> ExtraSymbolActions => 98 ImmutableArray.Create<(Action<SymbolAnalysisContext> Action, SymbolKind[] SymbolKind)> ((typeDerivesFromRucBase, new SymbolKind[] { SymbolKind.NamedType }));
Microsoft.AspNetCore.Analyzers (3)
BuildServiceProviderAnalyzer.cs (1)
19public void AnalyzeSymbol(SymbolAnalysisContext context)
UseAuthorizationAnalyzer.cs (1)
20public void AnalyzeSymbol(SymbolAnalysisContext context)
UseMvcAnalyzer.cs (1)
19public void AnalyzeSymbol(SymbolAnalysisContext context)
Microsoft.AspNetCore.App.Analyzers (5)
Mvc\DetectAmbiguousActionRoutes.cs (1)
21private static void DetectAmbiguousActionRoutes(SymbolAnalysisContext context, WellKnownTypes wellKnownTypes, RoutePatternTree? controllerRoutePattern, List<ActionRoute> actionRoutes)
Mvc\DetectOverriddenAuthorizeAttribute.cs (3)
26private static void DetectOverriddenAuthorizeAttributeOnController(SymbolAnalysisContext context, WellKnownTypes wellKnownTypes, 56private static void DetectOverriddenAuthorizeAttributeOnAction(SymbolAnalysisContext context, WellKnownTypes wellKnownTypes, 206private static void ReportOverriddenAuthorizeAttributeDiagnosticsIfAny(SymbolAnalysisContext context,
Mvc\MvcAnalyzer.cs (1)
91private static void PopulateActionRoutes(SymbolAnalysisContext context, WellKnownTypes wellKnownTypes, RouteUsageCache routeUsageCache, List<ActionRoute> actionRoutes, IMethodSymbol methodSymbol)
Microsoft.AspNetCore.Components.Analyzers (2)
InternalUsageAnalyzer.cs (2)
75private void AnalyzeSymbol(SymbolAnalysisContext context) 156private void VisitDeclarationSymbol(SymbolAnalysisContext context, ISymbol symbol, ISymbol symbolForDiagnostic)
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
InternalUsageAnalyzer.cs (2)
75private void AnalyzeSymbol(SymbolAnalysisContext context) 156private void VisitDeclarationSymbol(SymbolAnalysisContext context, ISymbol symbol, ISymbol symbolForDiagnostic)
Microsoft.AspNetCore.Mvc.Analyzers (4)
AttributesShouldNotBeAppliedToPageModelAnalyzer.cs (4)
82private static void ReportRouteDiagnosticOnModel(SymbolAnalysisContext context, INamedTypeSymbol typeSymbol, INamedTypeSymbol routeAttribute) 96private static void ReportRouteDiagnostic(SymbolAnalysisContext context, IMethodSymbol method, INamedTypeSymbol routeAttribute) 110private static void ReportFilterDiagnostic(SymbolAnalysisContext context, IMethodSymbol method, INamedTypeSymbol filterAttribute) 137private static Location GetAttributeLocation(SymbolAnalysisContext context, AttributeData attribute)
Microsoft.CodeAnalysis (15)
DiagnosticAnalyzer\AnalyzerExecutor.cs (2)
386var context = new SymbolAnalysisContext(symbol, Compilation, AnalyzerOptions, addDiagnostic, 488var context = new SymbolAnalysisContext(symbol, Compilation, AnalyzerOptions, addDiagnostic,
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (6)
76public void RegisterSymbolAction(Action<SymbolAnalysisContext> action, params SymbolKind[] symbolKinds) 87public abstract void RegisterSymbolAction(Action<SymbolAnalysisContext> action, ImmutableArray<SymbolKind> symbolKinds); 371public void RegisterSymbolAction(Action<SymbolAnalysisContext> action, params SymbolKind[] symbolKinds) 382public abstract void RegisterSymbolAction(Action<SymbolAnalysisContext> action, ImmutableArray<SymbolKind> symbolKinds); 762/// A symbol action can use a <see cref="SymbolAnalysisContext"/> to report <see cref="Diagnostic"/>s about an <see cref="ISymbol"/>. 927public abstract void RegisterSymbolEndAction(Action<SymbolAnalysisContext> action);
DiagnosticAnalyzer\DiagnosticAnalyzerAction.cs (4)
23public Action<SymbolAnalysisContext> Action { get; } 26public SymbolAnalyzerAction(Action<SymbolAnalysisContext> action, ImmutableArray<SymbolKind> kinds, DiagnosticAnalyzer analyzer) 49public Action<SymbolAnalysisContext> Action { get; } 51public SymbolEndAnalyzerAction(Action<SymbolAnalysisContext> action, DiagnosticAnalyzer analyzer)
DiagnosticAnalyzer\DiagnosticStartAnalysisScope.cs (3)
60public override void RegisterSymbolAction(Action<SymbolAnalysisContext> action, ImmutableArray<SymbolKind> symbolKinds) 165public override void RegisterSymbolAction(Action<SymbolAnalysisContext> action, ImmutableArray<SymbolKind> symbolKinds) 241public override void RegisterSymbolEndAction(Action<SymbolAnalysisContext> action)
Microsoft.CodeAnalysis.CodeStyle (16)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (2)
86void AnalyzeFieldSymbol(SymbolAnalysisContext symbolContext) 111void OnSymbolEnd(SymbolAnalysisContext symbolEndContext)
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
58void SymbolAction(SymbolAnalysisContext symbolContext)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (2)
276private void AnalyzeSymbolDeclaration(SymbolAnalysisContext symbolContext) 468private void OnSymbolEnd(SymbolAnalysisContext symbolEndContext, bool hasUnsupportedOperation)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
109private void OnSymbolEnd(SymbolAnalysisContext context)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
542SymbolAnalysisContext context)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalysisContextExtensions.cs (9)
60/// - <see cref="SymbolAnalysisContext.FilterSpan"/> is <see langword="null"/> (we are analyzing the entire tree) 62/// - <paramref name="span"/> intersects with <see cref="SymbolAnalysisContext.FilterSpan"/>. 64public static bool ShouldAnalyzeSpan(this SymbolAnalysisContext context, TextSpan span, SyntaxTree tree) 70/// - <see cref="SymbolAnalysisContext.FilterSpan"/> is <see langword="null"/> (we are analyzing the entire tree) 72/// - <paramref name="location"/> intersects with <see cref="SymbolAnalysisContext.FilterSpan"/>. 74public static bool ShouldAnalyzeLocation(this SymbolAnalysisContext context, Location location) 173/// NOTE: This method expects <see cref="SymbolAnalysisContext.FilterTree"/> 174/// and <see cref="SymbolAnalysisContext.FilterSpan"/> to be non-null. 176public static SyntaxNode GetAnalysisRoot(this SymbolAnalysisContext context, bool findInTrivia, bool getInnermostNodeForTie = false)
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
109private void SymbolEndAction(SymbolAnalysisContext context)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
102SymbolAnalysisContext context, ReportDiagnostic severity, PooledDictionary<IMethodSymbol, Diagnostic> methodToDiagnostic)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
164private void OnSymbolEnd(SymbolAnalysisContext context)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
874private void OnSymbol(SymbolAnalysisContext context)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (23)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
270private void AnalyzeSymbol(SymbolAnalysisContext context)
Semantics\PrimaryConstructorTests.cs (13)
4085private void Handle(SymbolAnalysisContext context) 4211private void Handle2(SymbolAnalysisContext context) 4217private void Handle4(SymbolAnalysisContext context) 4223private void Handle5(SymbolAnalysisContext context) 4232private void Handle6(SymbolAnalysisContext context) 5147private void Handle1(SymbolAnalysisContext context) 5169private void Handle2(SymbolAnalysisContext context) 5179private void Handle3(SymbolAnalysisContext context) 5488private void Handle(SymbolAnalysisContext context) 5615private void Handle2(SymbolAnalysisContext context) 5621private void Handle4(SymbolAnalysisContext context) 5627private void Handle5(SymbolAnalysisContext context) 5636private void Handle6(SymbolAnalysisContext context)
Semantics\RecordTests.cs (9)
26568private void Handle(SymbolAnalysisContext context) 26711private void Handle2(SymbolAnalysisContext context) 26717private void Handle3(SymbolAnalysisContext context) 26723private void Handle4(SymbolAnalysisContext context) 26729private void Handle5(SymbolAnalysisContext context) 26740private void Handle6(SymbolAnalysisContext context) 27659private void Handle1(SymbolAnalysisContext context) 27681private void Handle2(SymbolAnalysisContext context) 27697private void Handle3(SymbolAnalysisContext context)
Microsoft.CodeAnalysis.CSharp.Features (3)
src\Analyzers\CSharp\Analyzers\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableDiagnosticAnalyzer.cs (1)
109private void SymbolEndAction(SymbolAnalysisContext context)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
102SymbolAnalysisContext context, ReportDiagnostic severity, PooledDictionary<IMethodSymbol, Diagnostic> methodToDiagnostic)
src\Analyzers\CSharp\Analyzers\UsePrimaryConstructor\CSharpUsePrimaryConstructorDiagnosticAnalyzer.cs (1)
164private void OnSymbolEnd(SymbolAnalysisContext context)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (17)
Semantics\RecordStructTests.cs (9)
6189private void Handle(SymbolAnalysisContext context) 6333private void Handle2(SymbolAnalysisContext context) 6339private void Handle3(SymbolAnalysisContext context) 6345private void Handle4(SymbolAnalysisContext context) 6351private void Handle5(SymbolAnalysisContext context) 6362private void Handle6(SymbolAnalysisContext context) 6822private void Handle1(SymbolAnalysisContext context) 6844private void Handle2(SymbolAnalysisContext context) 6860private void Handle3(SymbolAnalysisContext context)
Semantics\TopLevelStatementsTests.cs (7)
6533private void Handle(SymbolAnalysisContext context) 6652private void Handle3(SymbolAnalysisContext context) 6659private void Handle4(SymbolAnalysisContext context) 6666private void Handle5(SymbolAnalysisContext context) 7274private void Handle1(SymbolAnalysisContext context) 7280private void Handle2(SymbolAnalysisContext context) 7286private void Handle3(SymbolAnalysisContext context)
SourceGeneration\GeneratorDriverTests.cs (1)
188private void Handle(SymbolAnalysisContext context)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (10)
CodeFixes\CodeFixServiceTests.vb (1)
204Public Sub AnalyzeSymbol(context As SymbolAnalysisContext)
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
92Public Shared Sub AnalyzeSymbol(context As SymbolAnalysisContext)
Diagnostics\DiagnosticServiceTests.vb (8)
1260Public Shared Sub AnalyzeSymbol(context As SymbolAnalysisContext) 1460compilationContext.RegisterSymbolAction(Sub(symbolContext As SymbolAnalysisContext) 1547Private Sub AnalyzeSymbol(context As SymbolAnalysisContext) 1572Private Sub AnalyzeSymbol(context As SymbolAnalysisContext) 1598compStartContext.RegisterSymbolAction(Sub(sc As SymbolAnalysisContext) 1624Private Sub AnalyzeSymbol(context As SymbolAnalysisContext) 1641Public Sub AnalyzeSymbol(context As SymbolAnalysisContext) 1784Public Sub AnalyzeSymbol(context As SymbolAnalysisContext)
Microsoft.CodeAnalysis.Features (7)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (2)
86void AnalyzeFieldSymbol(SymbolAnalysisContext symbolContext) 111void OnSymbolEnd(SymbolAnalysisContext symbolEndContext)
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (1)
58void SymbolAction(SymbolAnalysisContext symbolContext)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (2)
276private void AnalyzeSymbolDeclaration(SymbolAnalysisContext symbolContext) 468private void OnSymbolEnd(SymbolAnalysisContext symbolEndContext, bool hasUnsupportedOperation)
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
109private void OnSymbolEnd(SymbolAnalysisContext context)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
542SymbolAnalysisContext context)
Microsoft.CodeAnalysis.Test.Utilities (6)
Diagnostics\CommonDiagnosticAnalyzers.cs (5)
792private void AnalyzeSymbol(SymbolAnalysisContext context) 1215private void ReportDiagnosticIfActionInvokedConcurrently(SemaphoreSlim gate, SymbolAnalysisContext symbolContext) 1862private void SymbolAction(SymbolAnalysisContext context) 2053void performSymbolEndActionVerification(SymbolAnalysisContext symbolEndContext, SymbolStartAnalysisContext symbolStartContext) 2115void verifySymbolEndOrdering(SymbolAnalysisContext symbolEndContext)
Diagnostics\TestDiagnosticAnalyzer.cs (1)
80private void AnalyzeSymbol(SymbolAnalysisContext context)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (2)
CommandLineTests.vb (2)
11041Public Sub AnalyzeSymbol(context As SymbolAnalysisContext) 11065Public Sub AnalyzeSymbol(context As SymbolAnalysisContext)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (3)
Diagnostics\DiagnosticAnalyzerTests.vb (2)
315Public Sub AnalyzeSymbol(context As SymbolAnalysisContext) 509Public Sub AnalyzeSymbol(context As SymbolAnalysisContext)
Diagnostics\GetDiagnosticsTests.vb (1)
720context.RegisterSymbolAction(Sub(symbolContext As SymbolAnalysisContext)
Microsoft.CodeAnalysis.Workspaces (9)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalysisContextExtensions.cs (9)
60/// - <see cref="SymbolAnalysisContext.FilterSpan"/> is <see langword="null"/> (we are analyzing the entire tree) 62/// - <paramref name="span"/> intersects with <see cref="SymbolAnalysisContext.FilterSpan"/>. 64public static bool ShouldAnalyzeSpan(this SymbolAnalysisContext context, TextSpan span, SyntaxTree tree) 70/// - <see cref="SymbolAnalysisContext.FilterSpan"/> is <see langword="null"/> (we are analyzing the entire tree) 72/// - <paramref name="location"/> intersects with <see cref="SymbolAnalysisContext.FilterSpan"/>. 74public static bool ShouldAnalyzeLocation(this SymbolAnalysisContext context, Location location) 173/// NOTE: This method expects <see cref="SymbolAnalysisContext.FilterTree"/> 174/// and <see cref="SymbolAnalysisContext.FilterSpan"/> to be non-null. 176public static SyntaxNode GetAnalysisRoot(this SymbolAnalysisContext context, bool findInTrivia, bool getInnermostNodeForTie = false)
Microsoft.DotNet.CodeAnalysis (2)
Analyzers\MembersMustExistAnalyzer.cs (1)
83private void AnalyzeSymbol(SymbolAnalysisContext context)
Analyzers\PinvokeAnalyzer.cs (1)
133private void AnalyzeMethod(SymbolAnalysisContext context)
Microsoft.Interop.LibraryImportGenerator (1)
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
67private static void AnalyzeSymbol(SymbolAnalysisContext context, INamedTypeSymbol libraryImportAttrType, StubEnvironment env)
Microsoft.ML.CodeAnalyzer.Tests (1)
Code\RelaxTestNamingTest.cs (1)
119private void AnalyzeSymbol(SymbolAnalysisContext context)
Microsoft.ML.InternalCodeAnalyzer (4)
BaseTestClassAnalyzer.cs (1)
65public void AnalyzeNamedType(SymbolAnalysisContext context)
BestFriendOnPublicDeclarationsAnalyzer.cs (1)
57private void AnalyzeCore(SymbolAnalysisContext context, INamedTypeSymbol attributeType)
InstanceInitializerAnalyzer.cs (2)
40private static void AnalyzeField(SymbolAnalysisContext context) 63private static void AnalyzeProperty(SymbolAnalysisContext context)
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationAnalyzer.cs (1)
25private static void AnalyzeSymbol(SymbolAnalysisContext context)
System.Windows.Forms.Analyzers.VisualBasic (1)
Analyzers\MissingPropertySerializationConfiguration\MissingPropertySerializationConfigurationDiagnosticAnalyzer.vb (1)
27Private Shared Sub AnalyzeSymbol(context As SymbolAnalysisContext)