Esempio n. 1
0
        public RazorHtmlPublishDiagnosticsInterceptor(
            LSPDocumentManager documentManager,
            LSPDiagnosticsTranslator diagnosticsProvider,
            HTMLCSharpLanguageServerFeedbackFileLoggerProvider loggerProvider)
        {
            if (documentManager is null)
            {
                throw new ArgumentNullException(nameof(documentManager));
            }

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

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

            _documentManager     = documentManager;
            _diagnosticsProvider = diagnosticsProvider;

            _logger = loggerProvider.CreateLogger(nameof(RazorHtmlPublishDiagnosticsInterceptor));
        }
Esempio n. 2
0
        public DocumentPullDiagnosticsHandler(
            LSPRequestInvoker requestInvoker,
            LSPDocumentManager documentManager,
            LSPDocumentSynchronizer documentSynchronizer,
            LSPDiagnosticsTranslator diagnosticsProvider,
            HTMLCSharpLanguageServerFeedbackFileLoggerProvider loggerProvider)
        {
            if (requestInvoker is null)
            {
                throw new ArgumentNullException(nameof(requestInvoker));
            }

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

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

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

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

            _requestInvoker       = requestInvoker;
            _documentManager      = documentManager;
            _documentSynchronizer = documentSynchronizer;
            _diagnosticsProvider  = diagnosticsProvider;

            _logger = loggerProvider.CreateLogger(nameof(DocumentPullDiagnosticsHandler));
        }