Exemple #1
0
        internal Analyzers(SecurityAnalyzer analyzer)
        {
            if (!analyzer.GetType().GetCustomAttributes(typeof(SecurityAnalyzerAttribute), false).Any())
            {
                throw new Exception("Analyzer is derived from SecurityAnalyzer, but doesn't have 'SecurityAnalyzer' attribute.");
            }

            Workers = new Lazy <List <SecurityAnalyzer> >(() => new List <SecurityAnalyzer> {
                analyzer
            });
            Diagnostics = new Lazy <ImmutableArray <DiagnosticDescriptor> >(InitDiagnostics);
        }
Exemple #2
0
        internal Analyzers(SecurityAnalyzer analyzer)
        {
            if (!analyzer.GetType().GetCustomAttributes(typeof(SecurityAnalyzerAttribute), false).Any())
            {
                throw new Exception("Analyzer is derived from SecurityAnalyzer, but doesn't have 'SecurityAnalyzer' attribute.");
            }

            Workers = new List <SecurityAnalyzer> {
                analyzer
            };
            InitDiagnostics();
        }
Exemple #3
0
 internal VBasicAnalyzers(SecurityAnalyzer analyzer) : base(analyzer)
 {
 }
Exemple #4
0
 internal CSharpAnalyzers(SecurityAnalyzer analyzer) : base(analyzer)
 {
 }