Пример #1
0
        public IDisposable Register(Action <ILanguageServerRegistry> registryAction)
        {
            var manager = new CompositeHandlersManager(_handlersManager.Value);

            registryAction(new LangaugeServerRegistry(ResolverContext, manager, _textDocumentIdentifiers));

            var result = manager.GetDisposable();

            if (_instancesHasStarted.Started)
            {
                LanguageServerHelpers.InitHandlers(ResolverContext.Resolve <ILanguageServer>(), result, _supportedCapabilities.Value);
            }

            return(LanguageServerHelpers.RegisterHandlers(_hasStarted, Client, _workDoneManager.Value, _supportedCapabilities.Value, result));
        }