/// <summary>
 /// Report a <see cref="Diagnostic"/> about a <see cref="SyntaxNode"/>.
 /// </summary>
 /// <param name="diagnostic"><see cref="Diagnostic"/> to be reported.</param>
 public void ReportDiagnostic(Diagnostic diagnostic)
 {
     DiagnosticAnalysisContextHelpers.VerifyArguments(diagnostic);
     lock (_reportDiagnostic)
     {
         _reportDiagnostic(diagnostic);
     }
 }
 public override void RegisterSyntaxNodeAction <TLanguageKindEnum>(Action <SyntaxNodeAnalysisContext> action, ImmutableArray <TLanguageKindEnum> syntaxKinds)
 {
     DiagnosticAnalysisContextHelpers.VerifyArguments(action, syntaxKinds);
     _scope.RegisterSyntaxNodeAction(_analyzer, action, syntaxKinds);
 }
 public override void RegisterCodeBlockEndAction(Action <CodeBlockEndAnalysisContext> action)
 {
     DiagnosticAnalysisContextHelpers.VerifyArguments(action);
     _scope.RegisterCodeBlockEndAction(_analyzer, action);
 }
 public override void RegisterCodeBlockStartAction <TLanguageKindEnum>(Action <CodeBlockStartAnalysisContext <TLanguageKindEnum> > action)
 {
     DiagnosticAnalysisContextHelpers.VerifyArguments(action);
     _scope.RegisterCodeBlockStartAction <TLanguageKindEnum>(_analyzer, action);
 }
 public override void RegisterSymbolAction(Action <SymbolAnalysisContext> action, ImmutableArray <SymbolKind> symbolKinds)
 {
     DiagnosticAnalysisContextHelpers.VerifyArguments(action, symbolKinds);
     _scope.RegisterSymbolAction(_analyzer, action, symbolKinds);
 }
 public override void RegisterSemanticModelAction(Action <SemanticModelAnalysisContext> action)
 {
     DiagnosticAnalysisContextHelpers.VerifyArguments(action);
     _scope.RegisterSemanticModelAction(_analyzer, action);
 }
Beispiel #7
0
 internal override void RegisterOperationBlockStartActionInternal(Action <OperationBlockStartAnalysisContext> action)
 {
     DiagnosticAnalysisContextHelpers.VerifyArguments(action);
     _scope.RegisterOperationBlockStartAction(_analyzer, action);
 }
Beispiel #8
0
 internal override void RegisterOperationActionImmutableArrayInternal(Action <OperationAnalysisContext> action, ImmutableArray <OperationKind> operationKinds)
 {
     DiagnosticAnalysisContextHelpers.VerifyArguments(action, operationKinds);
     _scope.RegisterOperationAction(_analyzer, action, operationKinds);
 }
 public override void RegisterOperationBlockAction(Action <OperationBlockAnalysisContext> action)
 {
     DiagnosticAnalysisContextHelpers.VerifyArguments(action);
     _scope.RegisterOperationBlockAction(this._analyzer, action);
 }
 public override void RegisterOperationBlockAction(Action <OperationBlockAnalysisContext> action)
 {
     DiagnosticAnalysisContextHelpers.VerifyIOperationFeatureFlag(_isIOperationFeatureEnabled);
     DiagnosticAnalysisContextHelpers.VerifyArguments(action);
     _scope.RegisterOperationBlockAction(_analyzer, action);
 }
 public override void RegisterOperationAction(Action <OperationAnalysisContext> action, ImmutableArray <OperationKind> operationKinds)
 {
     DiagnosticAnalysisContextHelpers.VerifyIOperationFeatureFlag(_isIOperationFeatureEnabled);
     DiagnosticAnalysisContextHelpers.VerifyArguments(action, operationKinds);
     _scope.RegisterOperationAction(_analyzer, action, operationKinds);
 }
Beispiel #12
0
 public override void RegisterSymbolStartAction(Action <SymbolStartAnalysisContext> action, SymbolKind symbolKind)
 {
     DiagnosticAnalysisContextHelpers.VerifyArguments(action);
     _scope.RegisterSymbolStartAction(_analyzer, action, symbolKind);
 }