Пример #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);
        }
Пример #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();
        }
Пример #3
0
 internal VBasicAnalyzers(SecurityAnalyzer analyzer) : base(analyzer)
 {
 }
Пример #4
0
 internal CSharpAnalyzers(SecurityAnalyzer analyzer) : base(analyzer)
 {
 }