public DiagnosticAnalyzerService([Import(AllowDefault = true)] IWorkspaceDiagnosticAnalyzerProviderService diagnosticAnalyzerProviderService = null, [Import(AllowDefault = true)] AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource = null) : this(workspaceAnalyzerAssemblies : diagnosticAnalyzerProviderService != null ? diagnosticAnalyzerProviderService.GetWorkspaceAnalyzerAssemblies() : SpecializedCollections.EmptyEnumerable <string>(), hostDiagnosticUpdateSource : hostDiagnosticUpdateSource) { }
public DiagnosticAnalyzerService( [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>(), hostDiagnosticUpdateSource, new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.DiagnosticService)) { }
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)) { // diagnosticAnalyzerProviderService and hostDiagnosticUpdateSource can only be null in test hardness otherwise, it should // never be null }
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 }
private static ImmutableArray <HostDiagnosticAnalyzerPackage> GetHostDiagnosticAnalyzerPackage(IWorkspaceDiagnosticAnalyzerProviderService diagnosticAnalyzerProviderService) { return((diagnosticAnalyzerProviderService?.GetHostDiagnosticAnalyzerPackages()).ToImmutableArrayOrEmpty()); }