public RemoteHostClientServiceFactory(
     IDiagnosticAnalyzerService analyzerService,
     IEditorOptionsFactoryService editorOptionService)
 {
     _analyzerService = analyzerService;
     _editorOptionService = editorOptionService;
 }
 public PreviewSolutionCrawlerRegistrationServiceFactory(IDiagnosticAnalyzerService analyzerService)
 {
     // this service is directly tied to DiagnosticAnalyzerService and
     // depends on its implementation.
     _analyzerService = analyzerService as DiagnosticAnalyzerService;
     Contract.ThrowIfNull(_analyzerService);
 }
            public RemoteHostClientService(Workspace workspace, IDiagnosticAnalyzerService analyzerService)
            {
                _gate = new object();

                _workspace = workspace;
                _analyzerService = analyzerService;
            }
 public RemoteHostClientServiceFactory(
     [ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners,
     IDiagnosticAnalyzerService analyzerService)
 {
     _listener = new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.RemoteHostClient);
     _analyzerService = analyzerService;
 }
 public OutOfProcDiagnosticAnalyzerExecutor(
     IDiagnosticAnalyzerService analyzerService,
     AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource)
 {
     _analyzerService = analyzerService;
     _hostDiagnosticUpdateSource = hostDiagnosticUpdateSource;
 }
            public RemoteHostClientService(
                IAsynchronousOperationListener listener,
                Workspace workspace,
                IDiagnosticAnalyzerService analyzerService) :
                base()
            {
                _gate = new object();

                _listener = listener;
                _workspace = workspace;
                _analyzerService = analyzerService;
            }
 public StateMachine(
     ITextBuffer buffer,
     IInlineRenameService inlineRenameService,
     IAsynchronousOperationListener asyncListener,
     IDiagnosticAnalyzerService diagnosticAnalyzerService)
 {
     _buffer = buffer;
     _buffer.Changed += Buffer_Changed;
     _inlineRenameService = inlineRenameService;
     _asyncListener = asyncListener;
     _diagnosticAnalyzerService = diagnosticAnalyzerService;
 }
            public RemoteHostClientService(
                Workspace workspace,
                IDiagnosticAnalyzerService analyzerService,
                IEditorOptions globalEditorOptions) :
                base()
            {
                _gate = new object();

                _workspace = workspace;
                _analyzerService = analyzerService;
                _globalEditorOptions = globalEditorOptions;
            }
        public OutOfProcDiagnosticAnalyzerExecutor(
            IDiagnosticAnalyzerService analyzerService,
            AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource)
        {
            _analyzerService = analyzerService;
            _hostDiagnosticUpdateSource = hostDiagnosticUpdateSource;

            // currently option is a bit wierd since it is not part of snapshot and 
            // we can't load all options without loading all language specific dlls.
            // we have tracking issue for this.
            // https://github.com/dotnet/roslyn/issues/13643
            _lastOptionSetPerLanguage = new ConcurrentDictionary<string, ValueTuple<OptionSet, Asset>>();
        }
 public SuggestedActionsSourceProvider(
     ICodeRefactoringService codeRefactoringService,
     IDiagnosticAnalyzerService diagnosticService,
     ICodeFixService codeFixService,
     ICodeActionEditHandlerService editHandler,
     [ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners)
 {
     _codeRefactoringService = codeRefactoringService;
     _diagnosticService = diagnosticService;
     _codeFixService = codeFixService;
     _editHandler = editHandler;
     _listener = new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.LightBulb);
 }
        public SuggestedActionsSourceProvider(
            ICodeRefactoringService codeRefactoringService,
            IDiagnosticAnalyzerService diagnosticService,
            ICodeFixService codeFixService,
            ICodeActionEditHandlerService editHandler,
            IWaitIndicator waitIndicator,
            [ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners,
            [ImportMany] IEnumerable<Lazy<IImageMonikerService, OrderableMetadata>> imageMonikerServices)
        {
            _codeRefactoringService = codeRefactoringService;
            _diagnosticService = diagnosticService;
            _codeFixService = codeFixService;
            EditHandler = editHandler;
            WaitIndicator = waitIndicator;
            OperationListener = new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.LightBulb);

            ImageMonikerServices = ExtensionOrderer.Order(imageMonikerServices).ToImmutableArray();
        }
        public VisualStudioSuppressionFixService(
            SVsServiceProvider serviceProvider,
            VisualStudioWorkspaceImpl workspace,
            IDiagnosticAnalyzerService diagnosticService,
            ICodeFixService codeFixService,
            IVisualStudioDiagnosticListSuppressionStateService suppressionStateService,
            IWaitIndicator waitIndicator)
        {
            _workspace = workspace;
            _diagnosticService = diagnosticService;
            _codeFixService = codeFixService;
            _suppressionStateService = (VisualStudioDiagnosticListSuppressionStateService)suppressionStateService;
            _waitIndicator = waitIndicator;
            _fixMultipleOccurencesService = workspace.Services.GetService<IFixMultipleOccurrencesService>();

            var errorList = serviceProvider.GetService(typeof(SVsErrorList)) as IErrorList;
            _tableControl = errorList?.TableControl;
        }
Exemplo n.º 13
0
        public CodeFixService(
            IDiagnosticAnalyzerService service,
            [ImportMany]IEnumerable<Lazy<CodeFixProvider, CodeChangeProviderMetadata>> fixers,
            [ImportMany]IEnumerable<Lazy<ISuppressionFixProvider, CodeChangeProviderMetadata>> suppressionProviders)
        {
            _diagnosticService = service;

            var fixersPerLanguageMap = fixers.ToPerLanguageMapWithMultipleLanguages();
            var suppressionProvidersPerLanguageMap = suppressionProviders.ToPerLanguageMapWithMultipleLanguages();

            _workspaceFixersMap = GetFixerPerLanguageMap(fixersPerLanguageMap);
            _suppressionProvidersMap = GetSupressionProvidersPerLanguageMap(suppressionProvidersPerLanguageMap);

            // REVIEW: currently, fixer's priority is statically defined by the fixer itself. might considering making it more dynamic or configurable.
            _fixerPriorityMap = GetFixerPriorityPerLanguageMap(fixersPerLanguageMap);

            // Per-project fixers
            _projectFixersMap = new ConditionalWeakTable<IReadOnlyList<AnalyzerReference>, ImmutableDictionary<string, List<CodeFixProvider>>>();
            _analyzerReferenceToFixersMap = new ConditionalWeakTable<AnalyzerReference, ProjectCodeFixProvider>();
            _createProjectCodeFixProvider = new ConditionalWeakTable<AnalyzerReference, ProjectCodeFixProvider>.CreateValueCallback(r => new ProjectCodeFixProvider(r));
            _fixAllProviderMap = ImmutableDictionary<CodeFixProvider, FixAllProviderInfo>.Empty;
        }
 public EditAndContinueWorkspaceServiceFactory(IDiagnosticAnalyzerService diagnosticService)
 {
     _diagnosticService = diagnosticService;
 }
Exemplo n.º 15
0
 public DiagnosticItemSource(AnalyzerItem item, IAnalyzersCommandHandler commandHandler, IDiagnosticAnalyzerService diagnosticAnalyzerService)
 {
     _item = item;
     _commandHandler = commandHandler;
     _diagnosticAnalyzerService = diagnosticAnalyzerService;
 }
 public RemoteHostClientServiceFactory(IDiagnosticAnalyzerService analyzerService)
 {
     _analyzerService = analyzerService;
 }
 public VisualStudioDiagnosticAnalyzerService(VisualStudioWorkspaceImpl workspace, IDiagnosticAnalyzerService diagnosticService)
 {
     _workspace = workspace;
     _diagnosticService = diagnosticService;
 }
 internal EditAndContinueWorkspaceService(IDiagnosticAnalyzerService diagnosticService)
 {
     Debug.Assert(diagnosticService != null);
     _diagnosticService = diagnosticService;
 }
 public PreviewSolutionCrawlerRegistrationService(IDiagnosticAnalyzerService diagnosticService)
 {
     _provider = diagnosticService as IIncrementalAnalyzerProvider;
     Contract.ThrowIfNull(_provider);
 }
 public PreviewWorkCoordinatorRegistrationService(IDiagnosticAnalyzerService diagnosticService)
 {
     _provider = diagnosticService as IIncrementalAnalyzerProvider;
     Contract.ThrowIfNull(_provider);
 }