コード例 #1
0
        public HtmlVirtualDocumentFactory(
            IContentTypeRegistryService contentTypeRegistry,
            ITextBufferFactoryService textBufferFactory,
            ITextDocumentFactoryService textDocumentFactory,
            FileUriProvider filePathProvider)
        {
            if (contentTypeRegistry is null)
            {
                throw new ArgumentNullException(nameof(contentTypeRegistry));
            }

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

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

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

            _contentTypeRegistry = contentTypeRegistry;
            _textBufferFactory   = textBufferFactory;
            _textDocumentFactory = textDocumentFactory;
            _fileUriProvider     = filePathProvider;
        }
コード例 #2
0
        public DefaultLSPDocumentManager(
            JoinableTaskContext joinableTaskContext,
            FileUriProvider fileUriProvider,
            LSPDocumentFactory documentFactory,
            [ImportMany] IEnumerable <LSPDocumentManagerChangeTrigger> changeTriggers)
        {
            if (joinableTaskContext is null)
            {
                throw new ArgumentNullException(nameof(joinableTaskContext));
            }

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

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

            _joinableTaskContext = joinableTaskContext;
            _fileUriProvider     = fileUriProvider;
            _documentFactory     = documentFactory;
            _documents           = new Dictionary <Uri, LSPDocument>();

            foreach (var trigger in changeTriggers)
            {
                trigger.Initialize(this);
            }
        }
コード例 #3
0
 public HtmlVirtualDocumentFactory(
     IContentTypeRegistryService contentTypeRegistry,
     ITextBufferFactoryService textBufferFactory,
     ITextDocumentFactoryService textDocumentFactory,
     FileUriProvider filePathProvider)
     : base(contentTypeRegistry, textBufferFactory, textDocumentFactory, filePathProvider)
 {
 }
        public DefaultLSPDocumentSynchronizer(FileUriProvider fileUriProvider)
        {
            if (fileUriProvider is null)
            {
                throw new ArgumentNullException(nameof(fileUriProvider));
            }

            _fileUriProvider         = fileUriProvider;
            _virtualDocumentContexts = new Dictionary <Uri, DocumentContext>();
        }
コード例 #5
0
        public DefaultLSPDocumentFactory(
            FileUriProvider fileUriProvider,
            [ImportMany] IEnumerable <VirtualDocumentFactory> virtualBufferFactories)
        {
            if (fileUriProvider is null)
            {
                throw new ArgumentNullException(nameof(fileUriProvider));
            }

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

            _fileUriProvider          = fileUriProvider;
            _virtualDocumentFactories = virtualBufferFactories;
        }