public StartupAnalysisBuilder(StartupAnalyzer analyzer, StartupSymbols startupSymbols)
        {
            _analyzer      = analyzer;
            StartupSymbols = startupSymbols;

            _analysesByType = new Dictionary <INamedTypeSymbol, List <object> >();
            _lock           = new object();
        }
Пример #2
0
        public StartupAnalysisBuilder(StartupAnalyzer analyzer, StartupSymbols startupSymbols)
        {
            _analyzer      = analyzer;
            StartupSymbols = startupSymbols;

#pragma warning disable RS1024 // Compare symbols correctly
            _analysesByType = new Dictionary <INamedTypeSymbol, List <object> >(SymbolEqualityComparer.Default);
#pragma warning restore RS1024 // Compare symbols correctly
            _lock = new object();
        }
Пример #3
0
        public StartupAnalyzerTestBase()
        {
            StartupAnalyzer = new StartupAnalyzer();

            Analyses = new ConcurrentBag <object>();
            ConfigureServicesMethods = new ConcurrentBag <IMethodSymbol>();
            ConfigureMethods         = new ConcurrentBag <IMethodSymbol>();
            StartupAnalyzer.ServicesAnalysisCompleted    += (sender, analysis) => Analyses.Add(analysis);
            StartupAnalyzer.OptionsAnalysisCompleted     += (sender, analysis) => Analyses.Add(analysis);
            StartupAnalyzer.MiddlewareAnalysisCompleted  += (sender, analysis) => Analyses.Add(analysis);
            StartupAnalyzer.ConfigureServicesMethodFound += (sender, method) => ConfigureServicesMethods.Add(method);
            StartupAnalyzer.ConfigureMethodFound         += (sender, method) => ConfigureMethods.Add(method);
        }