Пример #1
0
 public DefaultDiagnosticIncrementalAnalyzer(
     DefaultDiagnosticAnalyzerService service,
     Workspace workspace
     )
 {
     _service   = service;
     _workspace = workspace;
     _diagnosticAnalyzerRunner = new InProcOrRemoteHostAnalyzerRunner(
         service._analyzerInfoCache
         );
 }
Пример #2
0
        public DocumentAnalysisExecutor(
            DocumentAnalysisScope analysisScope,
            CompilationWithAnalyzers?compilationWithAnalyzers,
            InProcOrRemoteHostAnalyzerRunner diagnosticAnalyzerRunner,
            bool logPerformanceInfo)
        {
            AnalysisScope             = analysisScope;
            _compilationWithAnalyzers = compilationWithAnalyzers;
            _diagnosticAnalyzerRunner = diagnosticAnalyzerRunner;
            _logPerformanceInfo       = logPerformanceInfo;

            var compilationBasedAnalyzers = compilationWithAnalyzers?.Analyzers.ToImmutableHashSet();

            _compilationBasedAnalyzersInAnalysisScope = compilationBasedAnalyzers != null
                ? analysisScope.Analyzers.WhereAsArray(compilationBasedAnalyzers.Contains)
                : ImmutableArray <DiagnosticAnalyzer> .Empty;
        }