public override void Initialize(AnalysisContext context) { #pragma warning disable CA1062 // Validate arguments of public methods context.RegisterCompilationStartAction(x => #pragma warning restore CA1062 // Validate arguments of public methods { var transaction = SyntaxTreeCache <SemanticModel> .Begin(x.Compilation); x.RegisterCompilationEndAction(_ => transaction.Dispose()); }); }
public override void Initialize(AnalysisContext context) { #pragma warning disable CA1062 // Validate arguments of public methods context.EnableConcurrentExecution(); #pragma warning restore CA1062 // Validate arguments of public methods context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); context.RegisterCompilationStartAction(x => { var transaction = SyntaxTreeCache <SemanticModel> .Begin(x.Compilation); x.RegisterCompilationEndAction(_ => transaction.Dispose()); }); }