Exemplo n.º 1
0
        public DefaultVisualStudioRazorParserFactory(
            JoinableTaskContext joinableTaskContext,
            ErrorReporter errorReporter,
            VisualStudioCompletionBroker completionBroker,
            ProjectSnapshotProjectEngineFactory projectEngineFactory)
        {
            if (joinableTaskContext is null)
            {
                throw new ArgumentNullException(nameof(joinableTaskContext));
            }

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

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

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

            _joinableTaskContext  = joinableTaskContext;
            _errorReporter        = errorReporter;
            _completionBroker     = completionBroker;
            _projectEngineFactory = projectEngineFactory;
        }
        public DefaultVisualStudioRazorParserFactory(
            ForegroundDispatcher dispatcher,
            ErrorReporter errorReporter,
            VisualStudioCompletionBroker completionBroker,
            RazorProjectEngineFactoryService projectEngineFactoryService)
        {
            if (dispatcher == null)
            {
                throw new ArgumentNullException(nameof(dispatcher));
            }

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

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

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

            _dispatcher                  = dispatcher;
            _errorReporter               = errorReporter;
            _completionBroker            = completionBroker;
            _projectEngineFactoryService = projectEngineFactoryService;
        }
Exemplo n.º 3
0
        public DefaultVisualStudioRazorParser(
            JoinableTaskContext joinableTaskContext,
            VisualStudioDocumentTracker documentTracker,
            ProjectSnapshotProjectEngineFactory projectEngineFactory,
            ErrorReporter errorReporter,
            VisualStudioCompletionBroker completionBroker)
        {
            if (joinableTaskContext is null)
            {
                throw new ArgumentNullException(nameof(joinableTaskContext));
            }

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

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

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

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

            _joinableTaskContext  = joinableTaskContext;
            _projectEngineFactory = projectEngineFactory;
            _errorReporter        = errorReporter;
            _completionBroker     = completionBroker;
            _documentTracker      = documentTracker;
            _codeDocumentRequests = new List <CodeDocumentRequest>();

            _documentTracker.ContextChanged += DocumentTracker_ContextChanged;

            _joinableTaskContext.AssertUIThread();
            _uiThreadScheduler = TaskScheduler.FromCurrentSynchronizationContext();
        }
Exemplo n.º 4
0
        public DefaultVisualStudioRazorParser(
            ForegroundDispatcher dispatcher,
            VisualStudioDocumentTracker documentTracker,
            ProjectSnapshotProjectEngineFactory projectEngineFactory,
            ErrorReporter errorReporter,
            VisualStudioCompletionBroker completionBroker)
        {
            if (dispatcher == null)
            {
                throw new ArgumentNullException(nameof(dispatcher));
            }

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

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

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

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

            _dispatcher           = dispatcher;
            _projectEngineFactory = projectEngineFactory;
            _errorReporter        = errorReporter;
            _completionBroker     = completionBroker;
            _documentTracker      = documentTracker;
            _codeDocumentRequests = new List <CodeDocumentRequest>();

            _documentTracker.ContextChanged += DocumentTracker_ContextChanged;
        }
Exemplo n.º 5
0
        public DefaultVisualStudioRazorParser(
            ForegroundDispatcher dispatcher,
            VisualStudioDocumentTracker documentTracker,
            RazorTemplateEngineFactoryService templateEngineFactory,
            ErrorReporter errorReporter,
            VisualStudioCompletionBroker completionBroker)
        {
            if (dispatcher == null)
            {
                throw new ArgumentNullException(nameof(dispatcher));
            }

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

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

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

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

            _dispatcher            = dispatcher;
            _templateEngineFactory = templateEngineFactory;
            _errorReporter         = errorReporter;
            _completionBroker      = completionBroker;
            _documentTracker       = documentTracker;

            _documentTracker.ContextChanged += DocumentTracker_ContextChanged;
        }