Esempio n. 1
0
 public static void RegisterSyntaxTreeActionInNonGenerated(this ParameterLoadingAnalysisContext context,
                                                           GeneratedCodeRecognizer generatedCodeRecognizer,
                                                           Action <SyntaxTreeAnalysisContext> action) =>
 context.RegisterCompilationStartAction(csac =>
                                        csac.RegisterSyntaxTreeAction(c =>
 {
     if (ShouldAnalyze(context.GetInnerContext(), generatedCodeRecognizer, c.GetSyntaxTree(), csac.Compilation, c.Options))
     {
         action(c);
     }
 }));
Esempio n. 2
0
 public static void RegisterSyntaxTreeActionInNonGenerated(
     this ParameterLoadingAnalysisContext context,
     GeneratedCodeRecognizer generatedCodeRecognizer,
     Action <SyntaxTreeAnalysisContext> action)
 {
     context.RegisterCompilationStartAction(
         csac =>
     {
         csac.RegisterSyntaxTreeAction(
             c =>
         {
             if (!c.Tree.IsGenerated(generatedCodeRecognizer, csac.Compilation))
             {
                 action(c);
             }
         });
     });
 }