예제 #1
0
 private void InitializeLogHubLogger()
 {
     if (_logHubLogger is null)
     {
         _logHubLogger = _loggerProvider.CreateLogger(nameof(DefaultLSPProjectionProvider));
     }
 }
예제 #2
0
        public SignatureHelpHandler(
            LSPRequestInvoker requestInvoker,
            LSPDocumentManager documentManager,
            LSPProjectionProvider projectionProvider,
            HTMLCSharpLanguageServerLogHubLoggerProvider loggerProvider)
        {
            if (requestInvoker is null)
            {
                throw new ArgumentNullException(nameof(requestInvoker));
            }

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

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

            _requestInvoker     = requestInvoker;
            _documentManager    = documentManager;
            _projectionProvider = projectionProvider;

            _logger = loggerProvider.CreateLogger(nameof(SignatureHelpHandler));
        }
        public CompletionHandler(
            JoinableTaskContext joinableTaskContext,
            LSPRequestInvoker requestInvoker,
            LSPDocumentManager documentManager,
            LSPProjectionProvider projectionProvider,
            ITextStructureNavigatorSelectorService textStructureNavigator,
            CompletionRequestContextCache completionRequestContextCache,
            FormattingOptionsProvider formattingOptionsProvider,
            HTMLCSharpLanguageServerLogHubLoggerProvider loggerProvider)
        {
            if (joinableTaskContext is null)
            {
                throw new ArgumentNullException(nameof(joinableTaskContext));
            }

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

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

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

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

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

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

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

            _joinableTaskFactory           = joinableTaskContext.Factory;
            _requestInvoker                = requestInvoker;
            _documentManager               = documentManager;
            _projectionProvider            = projectionProvider;
            _textStructureNavigator        = textStructureNavigator;
            _completionRequestContextCache = completionRequestContextCache;
            _formattingOptionsProvider     = formattingOptionsProvider;
            _logger = loggerProvider.CreateLogger(nameof(CompletionHandler));
        }
 public DefaultLSPDiagnosticsTranslator(
     LSPDocumentManager documentManager,
     LSPRequestInvoker requestInvoker,
     HTMLCSharpLanguageServerLogHubLoggerProvider loggerProvider)
 {
     _documentManager = documentManager;
     _requestInvoker  = requestInvoker;
     _logger          = loggerProvider.CreateLogger(nameof(DefaultLSPDiagnosticsTranslator));
 }
예제 #5
0
        private async Task InitializeLogHubAsync(CancellationToken cancellationToken)
        {
            if (_logHubLogger is null)
            {
                await _loggerProvider.InitializeLoggerAsync(cancellationToken);

                cancellationToken.ThrowIfCancellationRequested();

                _logHubLogger = _loggerProvider.CreateLogger(nameof(DefaultLSPProjectionProvider));
            }
        }
        public FindAllReferencesHandler(
            LSPRequestInvoker requestInvoker,
            LSPDocumentManager documentManager,
            LSPProjectionProvider projectionProvider,
            LSPDocumentMappingProvider documentMappingProvider,
            LSPProgressListener lspProgressListener,
            HTMLCSharpLanguageServerLogHubLoggerProvider loggerProvider)
        {
            if (requestInvoker is null)
            {
                throw new ArgumentNullException(nameof(requestInvoker));
            }

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

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

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

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

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

            _requestInvoker          = requestInvoker;
            _documentManager         = documentManager;
            _projectionProvider      = projectionProvider;
            _documentMappingProvider = documentMappingProvider;
            _lspProgressListener     = lspProgressListener;

            _logger = loggerProvider.CreateLogger(nameof(FindAllReferencesHandler));
        }
예제 #7
0
        public CompletionResolveHandler(
            LSPRequestInvoker requestInvoker,
            LSPDocumentManager documentManager,
            LSPDocumentMappingProvider documentMappingProvider,
            FormattingOptionsProvider formattingOptionsProvider,
            CompletionRequestContextCache completionRequestContextCache,
            HTMLCSharpLanguageServerLogHubLoggerProvider loggerProvider)
        {
            if (requestInvoker is null)
            {
                throw new ArgumentNullException(nameof(requestInvoker));
            }

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

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

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

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

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

            _requestInvoker                = requestInvoker;
            _documentManager               = documentManager;
            _documentMappingProvider       = documentMappingProvider;
            _formattingOptionsProvider     = formattingOptionsProvider;
            _completionRequestContextCache = completionRequestContextCache;

            _logger = loggerProvider.CreateLogger(nameof(CompletionResolveHandler));
        }
        public DocumentPullDiagnosticsHandler(
            LSPRequestInvoker requestInvoker,
            LSPDocumentManager documentManager,
            LSPDocumentSynchronizer documentSynchronizer,
            LSPDiagnosticsTranslator diagnosticsProvider,
            HTMLCSharpLanguageServerLogHubLoggerProvider 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));
        }