private DiagnosticAnalyzerService(IDiagnosticUpdateSourceRegistrationService registrationService) : this()
        {
            _eventMap = new EventMap();
            _eventQueue = new SimpleTaskQueue(TaskScheduler.Default);

            registrationService.Register(this);
        }
 internal TestDiagnosticAnalyzerService(
     ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzersMap,
     AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource = null,
     Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null,
     IDiagnosticUpdateSourceRegistrationService registrationService = null)
     : this(CreateHostAnalyzerManager(analyzersMap, hostDiagnosticUpdateSource), hostDiagnosticUpdateSource, onAnalyzerException, registrationService)
 {
 }
 private TestDiagnosticAnalyzerService(
     HostAnalyzerManager hostAnalyzerManager,
     AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource,
     Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException,
     IDiagnosticUpdateSourceRegistrationService registrationService = null)
     : base(hostAnalyzerManager, hostDiagnosticUpdateSource, registrationService ?? new MockDiagnosticUpdateSourceRegistrationService())
 {
     _onAnalyzerException = onAnalyzerException;
 }
        private DiagnosticAnalyzerService(IDiagnosticUpdateSourceRegistrationService registrationService) : this()
        {
            _eventMap = new EventMap();

            // use diagnostic event task scheduler so that we never flood async events queue with million of events.
            // queue itself can handle huge number of events but we are seeing OOM due to captured data in pending events.
            _eventQueue = new SimpleTaskQueue(s_eventScheduler);

            registrationService.Register(this);
        }
 private TestDiagnosticAnalyzerService(
     HostAnalyzerManager hostAnalyzerManager,
     AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource,
     Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException,
     IDiagnosticUpdateSourceRegistrationService registrationService = null)
     : base(hostAnalyzerManager, hostDiagnosticUpdateSource, registrationService ?? new MockDiagnosticUpdateSourceRegistrationService())
 {
     _hostAnalyzerReferenceMap = hostAnalyzerManager.CreateAnalyzerReferencesMap(projectOpt: null);
     _onAnalyzerException = onAnalyzerException;
 }
        /// <summary>
        /// internal for testing
        /// </summary>
        internal ExternalErrorDiagnosticUpdateSource(
            Workspace workspace,
            IDiagnosticAnalyzerService diagnosticService,
            IDiagnosticUpdateSourceRegistrationService registrationService,
            IAsynchronousOperationListener listener)
        {
            // use queue to serialize work. no lock needed
            _taskQueue = new SimpleTaskQueue(TaskScheduler.Default);
            _listener  = listener;

            _workspace = workspace;
            _workspace.WorkspaceChanged += OnWorkspaceChanged;

            _diagnosticService = diagnosticService;

            _notificationService = _workspace.Services.GetService <IGlobalOperationNotificationService>();

            registrationService.Register(this);
        }
        protected DiagnosticAnalyzerService(
            DiagnosticAnalyzerInfoCache analyzerInfoCache,
            HostDiagnosticAnalyzers hostAnalyzers,
            AbstractHostDiagnosticUpdateSource?hostDiagnosticUpdateSource,
            IDiagnosticUpdateSourceRegistrationService registrationService,
            IAsynchronousOperationListener?listener = null)
        {
            AnalyzerInfoCache           = analyzerInfoCache;
            HostAnalyzers               = hostAnalyzers;
            _hostDiagnosticUpdateSource = hostDiagnosticUpdateSource;

            _map = new ConditionalWeakTable <Workspace, DiagnosticIncrementalAnalyzer>();
            _createIncrementalAnalyzer = CreateIncrementalAnalyzerCallback;

            Listener  = listener ?? AsynchronousOperationListenerProvider.NullListener;
            _eventMap = new EventMap();

            // use diagnostic event task scheduler so that we never flood async events queue with million of events.
            // queue itself can handle huge number of events but we are seeing OOM due to captured data in pending events.
            _eventQueue = new TaskQueue(Listener, s_eventScheduler);

            registrationService.Register(this);
        }
 public DefaultDiagnosticAnalyzerService(
     IDiagnosticUpdateSourceRegistrationService registrationService)
 {
     _analyzerInfoCache = new DiagnosticAnalyzerInfoCache();
     registrationService.Register(this);
 }
Example #9
0
 public EditAndContinueDiagnosticUpdateSource(IDiagnosticUpdateSourceRegistrationService registrationService)
 {
     registrationService.Register(this);
 }
Example #10
0
        public MiscellaneousDiagnosticAnalyzerService(IDiagnosticAnalyzerService analyzerService, IDiagnosticUpdateSourceRegistrationService registrationService)
        {
            _analyzerService = analyzerService;

            registrationService.Register(this);
        }
Example #11
0
        public HostDiagnosticUpdateSource(VisualStudioWorkspaceImpl workspace, IDiagnosticUpdateSourceRegistrationService registrationService)
        {
            _workspace = workspace;

            registrationService.Register(this);
        }
 public DefaultDiagnosticAnalyzerService(IDiagnosticUpdateSourceRegistrationService registrationService)
 {
     registrationService.Register(this);
 }
Example #13
0
 private DiagnosticAnalyzerService(IDiagnosticUpdateSourceRegistrationService registrationService) : this()
 {
     registrationService.Register(this);
 }
        public HostDiagnosticUpdateSource(VisualStudioWorkspaceImpl workspace, IDiagnosticUpdateSourceRegistrationService registrationService)
        {
            _workspace = workspace;

            registrationService.Register(this);
        }
Example #15
0
        public HostDiagnosticUpdateSource(MonoDevelopWorkspace workspace, IDiagnosticUpdateSourceRegistrationService registrationService)
        {
            _workspace = workspace;

            registrationService.Register(this);
        }
 private DiagnosticAnalyzerService(IDiagnosticUpdateSourceRegistrationService registrationService) : this()
 {
     registrationService.Register(this);
 }