public DocumentChangedSynchronizationService(OmniSharpForegroundDispatcher foregroundDispatcher)
        {
            if (foregroundDispatcher is null)
            {
                throw new ArgumentNullException(nameof(foregroundDispatcher));
            }

            _foregroundDispatcher = foregroundDispatcher;
        }
        public OmniSharpProjectWorkspaceStateGenerator(OmniSharpForegroundDispatcher foregroundDispatcher)
        {
            if (foregroundDispatcher == null)
            {
                throw new ArgumentNullException(nameof(foregroundDispatcher));
            }

            InternalWorkspaceStateGenerator = new DefaultProjectWorkspaceStateGenerator(foregroundDispatcher.InternalDispatcher);
        }
Beispiel #3
0
        public OmniSharpWorkspaceProjectStateChangeDetector(
            OmniSharpForegroundDispatcher foregroundDispatcher,
            OmniSharpProjectWorkspaceStateGenerator workspaceStateGenerator)
        {
            if (foregroundDispatcher == null)
            {
                throw new ArgumentNullException(nameof(foregroundDispatcher));
            }

            if (workspaceStateGenerator == null)
            {
                throw new ArgumentNullException(nameof(workspaceStateGenerator));
            }

            InternalWorkspaceProjectStateChangeDetector = new ForegroundWorkspaceProjectStateChangeDetector(
                foregroundDispatcher.InternalDispatcher,
                workspaceStateGenerator.InternalWorkspaceStateGenerator);
        }
        public MSBuildProjectManager(
            [ImportMany] IEnumerable <ProjectConfigurationProvider> projectConfigurationProviders,
            ProjectInstanceEvaluator projectInstanceEvaluator,
            ProjectChangePublisher projectConfigurationPublisher,
            OmniSharpForegroundDispatcher foregroundDispatcher,
            ILoggerFactory loggerFactory)
        {
            if (projectConfigurationProviders == null)
            {
                throw new ArgumentNullException(nameof(projectConfigurationProviders));
            }

            if (projectInstanceEvaluator == null)
            {
                throw new ArgumentNullException(nameof(projectInstanceEvaluator));
            }

            if (projectConfigurationPublisher == null)
            {
                throw new ArgumentNullException(nameof(projectConfigurationPublisher));
            }

            if (foregroundDispatcher == null)
            {
                throw new ArgumentNullException(nameof(foregroundDispatcher));
            }

            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            _logger = loggerFactory.CreateLogger <MSBuildProjectManager>();
            _projectConfigurationProviders = projectConfigurationProviders;
            _projectInstanceEvaluator      = projectInstanceEvaluator;
            _projectConfigurationPublisher = projectConfigurationPublisher;
            _foregroundDispatcher          = foregroundDispatcher;
        }
Beispiel #5
0
        public OmniSharpBackgroundDocumentGenerator(
            OmniSharpForegroundDispatcher foregroundDispatcher,
            RemoteTextLoaderFactory remoteTextLoaderFactory,
            IEnumerable <OmniSharpDocumentProcessedListener> documentProcessedListeners)
        {
            if (foregroundDispatcher is null)
            {
                throw new ArgumentNullException(nameof(foregroundDispatcher));
            }

            if (remoteTextLoaderFactory is null)
            {
                throw new ArgumentNullException(nameof(remoteTextLoaderFactory));
            }

            if (documentProcessedListeners is null)
            {
                throw new ArgumentNullException(nameof(documentProcessedListeners));
            }

            var wrappedListeners = documentProcessedListeners.Select(listener => new WrappedDocumentProcessedListener(remoteTextLoaderFactory, listener));

            _backgroundDocumentGenerator = new BackgroundDocumentGenerator(foregroundDispatcher.InternalDispatcher, wrappedListeners);
        }