Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 public void AddSyntaxNodeAction<TLanguageKindEnum>(SyntaxNodeAnalyzerAction<TLanguageKindEnum> action)
     where TLanguageKindEnum : struct
 {
     this.syntaxNodeActions = this.syntaxNodeActions.Add(action);
 }