public static void RegisterCodeBlockStartActionInNonGenerated <TLanguageKindEnum>(
     this ParameterLoadingAnalysisContext context,
     Action <CodeBlockStartAnalysisContext <TLanguageKindEnum> > action) where TLanguageKindEnum : struct
 {
     context.RegisterCodeBlockStartActionInNonGenerated(VisualBasic.VisualBasicGeneratedCodeRecognizer.Instance, action);
 }
 public static void RegisterSyntaxNodeActionInNonGenerated <TSyntaxKind>(this ParameterLoadingAnalysisContext context,
                                                                         Action <SyntaxNodeAnalysisContext> action,
                                                                         params TSyntaxKind[] syntaxKinds) where TSyntaxKind : struct =>
 context.RegisterSyntaxNodeActionInNonGenerated(VisualBasicGeneratedCodeRecognizer.Instance, action, syntaxKinds);
 public static void RegisterSyntaxTreeActionInNonGenerated(
     this ParameterLoadingAnalysisContext context,
     Action <SyntaxTreeAnalysisContext> action)
 {
     context.RegisterSyntaxTreeActionInNonGenerated(VisualBasic.VisualBasicGeneratedCodeRecognizer.Instance, action);
 }
Пример #4
0
 public static void RegisterSyntaxNodeActionInNonGenerated <TLanguageKindEnum>(this ParameterLoadingAnalysisContext context,
                                                                               GeneratedCodeRecognizer generatedCodeRecognizer,
                                                                               Action <SyntaxNodeAnalysisContext> action,
                                                                               params TLanguageKindEnum[] syntaxKinds) where TLanguageKindEnum : struct =>
 context.RegisterSyntaxNodeAction(c =>
 {
     if (ShouldAnalyze(context.GetInnerContext(), generatedCodeRecognizer, c.GetSyntaxTree(), c.Compilation, c.Options))
     {
         action(c);
     }
 }, syntaxKinds.ToImmutableArray());