示例#1
0
        public override void Initialize(AnalysisContext analysisContext)
        {
            analysisContext.EnableConcurrentExecution();

            var config = new ConfigurationManager().GetBuiltInAndUserConfiguration();

            if (!config.AuditMode)
            {
                analysisContext.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
            }

            var ctx = new SecurityAnalysisContext();

            ctx.Initialize(analysisContext, Workers);
        }
示例#2
0
        public override void Initialize(AnalysisContext analysisContext)
        {
            if (!Debugger.IsAttached) // prefer single thread for debugging in development
            {
                analysisContext.EnableConcurrentExecution();
            }

            var config = new ConfigurationManager().GetBuiltInAndUserConfiguration();

            if (!config.AuditMode)
            {
                analysisContext.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None);
            }

            var ctx = new SecurityAnalysisContext();

            ctx.Initialize(analysisContext, Workers.Value);
        }