public static UnitTestingIncrementalAnalyzerProvider?TryRegister(
            Workspace workspace,
            string analyzerName,
            IUnitTestingIncrementalAnalyzerProviderImplementation provider
            )
        {
            var solutionCrawlerRegistrationService =
                workspace.Services.GetService <ISolutionCrawlerRegistrationService>();

            if (solutionCrawlerRegistrationService == null)
            {
                return(null);
            }

            var analyzerProvider = new UnitTestingIncrementalAnalyzerProvider(workspace, provider);

            var metadata = new IncrementalAnalyzerProviderMetadata(
                analyzerName,
                highPriorityForActiveFile: false,
                new[] { workspace.Kind }
                );

            solutionCrawlerRegistrationService.AddAnalyzerProvider(analyzerProvider, metadata);
            return(analyzerProvider);
        }
 public void AddAnalyzerProvider(
     IIncrementalAnalyzerProvider provider,
     IncrementalAnalyzerProviderMetadata metadata
     )
 {
     // preview solution crawler doesn't support adding and removing analyzer dynamically
     throw new NotSupportedException();
 }
 internal UnitTestingIncrementalAnalyzerProviderMetadataWrapper(IncrementalAnalyzerProviderMetadata underlyingObject)
 => UnderlyingObject = underlyingObject ?? throw new ArgumentNullException(nameof(underlyingObject));
 internal UnitTestingIncrementalAnalyzerProviderMetadataWrapper(
     IncrementalAnalyzerProviderMetadata underlyingObject
     ) =>