public DiagnosticAnalyzerService(
     IDiagnosticUpdateSourceRegistrationService registrationService,
     [ImportMany] IEnumerable <Lazy <IAsynchronousOperationListener, FeatureMetadata> > asyncListeners,
     [Import(AllowDefault = true)] IWorkspaceDiagnosticAnalyzerProviderService diagnosticAnalyzerProviderService = null,
     [Import(AllowDefault = true)] AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource = null)
     : this(diagnosticAnalyzerProviderService != null ? diagnosticAnalyzerProviderService.GetHostDiagnosticAnalyzerPackages() : SpecializedCollections.EmptyEnumerable <HostDiagnosticAnalyzerPackage>(),
            diagnosticAnalyzerProviderService?.GetAnalyzerAssemblyLoader(),
            hostDiagnosticUpdateSource,
            registrationService, new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.DiagnosticService))
 {
 }
Example #2
0
 public DiagnosticAnalyzerService(
     IDiagnosticUpdateSourceRegistrationService registrationService,
     IAsynchronousOperationListenerProvider listenerProvider,
     [Import(AllowDefault = true)] IWorkspaceDiagnosticAnalyzerProviderService diagnosticAnalyzerProviderService = null,
     [Import(AllowDefault = true)] AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource = null)
     : this(diagnosticAnalyzerProviderService != null ? diagnosticAnalyzerProviderService.GetHostDiagnosticAnalyzerPackages() : SpecializedCollections.EmptyEnumerable <HostDiagnosticAnalyzerPackage>(),
            diagnosticAnalyzerProviderService?.GetAnalyzerAssemblyLoader(),
            hostDiagnosticUpdateSource,
            registrationService, listenerProvider.GetListener(FeatureAttribute.DiagnosticService))
 {
     // diagnosticAnalyzerProviderService and hostDiagnosticUpdateSource can only be null in test hardness otherwise, it should
     // never be null
 }
Example #3
0
 public DiagnosticAnalyzerService(
     IDiagnosticUpdateSourceRegistrationService registrationService,
     IAsynchronousOperationListenerProvider listenerProvider,
     PrimaryWorkspace primaryWorkspace,
     [Import(AllowDefault = true)] IWorkspaceDiagnosticAnalyzerProviderService diagnosticAnalyzerProviderService = null,
     [Import(AllowDefault = true)] AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource = null)
     : this(new Lazy <ImmutableArray <HostDiagnosticAnalyzerPackage> >(() => GetHostDiagnosticAnalyzerPackage(diagnosticAnalyzerProviderService), isThreadSafe : true),
            diagnosticAnalyzerProviderService?.GetAnalyzerAssemblyLoader(),
            hostDiagnosticUpdateSource,
            primaryWorkspace,
            registrationService, listenerProvider.GetListener(FeatureAttribute.DiagnosticService))
 {
     // diagnosticAnalyzerProviderService and hostDiagnosticUpdateSource can only be null in test hardness otherwise, it should
     // never be null
 }