Example #1
0
        public RazorTextViewConnectionListener(VisualStudioWorkspaceAccessor workspaceAccessor)
        {
            if (workspaceAccessor == null)
            {
                throw new ArgumentNullException(nameof(workspaceAccessor));
            }

            _foregroundDispatcher = workspaceAccessor.Workspace.Services.GetRequiredService <ForegroundDispatcher>();

            var languageServices = workspaceAccessor.Workspace.Services.GetLanguageServices(RazorLanguage.Name);

            _documentManager = languageServices.GetRequiredService <RazorDocumentManager>();
        }
Example #2
0
        public RazorTextViewConnectionListener(JoinableTaskContext joinableTaskContext, RazorDocumentManager documentManager)
        {
            if (joinableTaskContext is null)
            {
                throw new ArgumentNullException(nameof(joinableTaskContext));
            }

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

            _joinableTaskContext = joinableTaskContext;
            _documentManager     = documentManager;
        }
        public RazorTextViewConnectionListener(ForegroundDispatcher foregroundDispatcher, RazorDocumentManager documentManager)
        {
            if (foregroundDispatcher == null)
            {
                throw new ArgumentNullException(nameof(foregroundDispatcher));
            }

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

            _foregroundDispatcher = foregroundDispatcher;
            _documentManager      = documentManager;
        }
Example #4
0
        public RazorTextViewConnectionListener(
            VisualStudioWorkspaceAccessor workspaceAccessor,
            RazorDocumentManager documentManager)
        {
            if (workspaceAccessor == null)
            {
                throw new ArgumentNullException(nameof(workspaceAccessor));
            }

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

            _documentManager      = documentManager;
            _foregroundDispatcher = workspaceAccessor.Workspace.Services.GetRequiredService <ForegroundDispatcher>();
        }