public RazorProjectEndpoint(
            ForegroundDispatcher foregroundDispatcher,
            RazorConfigurationResolver configurationResolver,
            RemoteTextLoaderFactory remoteTextLoaderFactory,
            RazorProjectService projectService,
            ILoggerFactory loggerFactory)
        {
            if (foregroundDispatcher == null)
            {
                throw new ArgumentNullException(nameof(foregroundDispatcher));
            }

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

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

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

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

            _foregroundDispatcher    = foregroundDispatcher;
            _configurationResolver   = configurationResolver;
            _remoteTextLoaderFactory = remoteTextLoaderFactory;
            _projectService          = projectService;
            _logger = loggerFactory.CreateLogger <RazorProjectEndpoint>();
        }
Пример #2
0
        public RazorDocumentSynchronizationEndpoint(
            ForegroundDispatcher foregroundDispatcher,
            DocumentResolver documentResolver,
            RemoteTextLoaderFactory remoteTextLoaderFactory,
            RazorProjectService projectService,
            ILoggerFactory loggerFactory)
        {
            if (foregroundDispatcher == null)
            {
                throw new ArgumentNullException(nameof(foregroundDispatcher));
            }

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

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

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

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

            _foregroundDispatcher    = foregroundDispatcher;
            _documentResolver        = documentResolver;
            _remoteTextLoaderFactory = remoteTextLoaderFactory;
            _projectService          = projectService;
            _logger = loggerFactory.CreateLogger <RazorDocumentSynchronizationEndpoint>();
        }