public void RegisterSyntaxNodeAction<TLanguageKindEnum>(DiagnosticAnalyzer analyzer, Action<SyntaxNodeAnalysisContext> action, params TLanguageKindEnum[] syntaxKinds) where TLanguageKindEnum : struct { SyntaxNodeAnalyzerAction<TLanguageKindEnum> analyzerAction = new SyntaxNodeAnalyzerAction<TLanguageKindEnum>(action, ImmutableArray.Create<TLanguageKindEnum>(syntaxKinds), analyzer); this.GetOrCreateAnalyzerActions(analyzer).AddSyntaxNodeAction(analyzerAction); this.syntaxNodeActions = this.syntaxNodeActions.Add(analyzerAction); }
public void AddSyntaxNodeAction<TLanguageKindEnum>(SyntaxNodeAnalyzerAction<TLanguageKindEnum> action) where TLanguageKindEnum : struct { this.syntaxNodeActions = this.syntaxNodeActions.Add(action); }