public override void Initialize(AnalysisContext context) { context.EnableConcurrentExecution(); context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); context.RegisterCompilationStartAction(ctx => { var lamarCtx = new LamarContext(ctx.Compilation); if (ContextDefined(lamarCtx)) { AnalyzeCompilation(ctx, lamarCtx); } }); }
protected abstract void AnalyzeCompilation(CompilationStartAnalysisContext ctx, LamarContext lamarCtx);
protected virtual bool ContextDefined(LamarContext lamarCtx) => lamarCtx.Version != null;