public DefaultRazorEditorFactoryService(VisualStudioWorkspaceAccessor workspaceAccessor)
        {
            if (workspaceAccessor == null)
            {
                throw new ArgumentNullException(nameof(workspaceAccessor));
            }

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

            _documentTrackerFactory    = razorLanguageServices.GetRequiredService <VisualStudioDocumentTrackerFactory>();
            _parserFactory             = razorLanguageServices.GetRequiredService <VisualStudioRazorParserFactory>();
            _braceSmartIndenterFactory = razorLanguageServices.GetRequiredService <BraceSmartIndenterFactory>();
        }
        // Internal for testing
        internal DefaultRazorEditorFactoryService(
            VisualStudioDocumentTrackerFactory documentTrackerFactory,
            VisualStudioRazorParserFactory parserFactory,
            BraceSmartIndenterFactory braceSmartIndenterFactory)
        {
            if (documentTrackerFactory == null)
            {
                throw new ArgumentNullException(nameof(documentTrackerFactory));
            }

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

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

            _documentTrackerFactory    = documentTrackerFactory;
            _parserFactory             = parserFactory;
            _braceSmartIndenterFactory = braceSmartIndenterFactory;
        }