public DefaultRazorEditorFactoryService(VisualStudioWorkspaceAccessor workspaceAccessor) { if (workspaceAccessor == null) { throw new ArgumentNullException(nameof(workspaceAccessor)); } _workspaceAccessor = workspaceAccessor; }
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>(); }
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>(); }
public RazorDirectiveCompletionProvider(VisualStudioWorkspaceAccessor workspaceAccessor) { if (workspaceAccessor == null) { throw new ArgumentNullException(nameof(workspaceAccessor)); } // Lazy because we don't want Microsoft.AspNetCore.Razor.Language assembly getting loaded for non Razor scenarios. _codeDocumentProvider = new Lazy <RazorCodeDocumentProvider>(() => { var languageServices = workspaceAccessor.Workspace.Services.GetLanguageServices(RazorLanguage.Name); return(languageServices.GetRequiredService <RazorCodeDocumentProvider>()); }); }
public DefaultCodeDocumentProvider( RazorTextBufferProvider bufferProvider, VisualStudioWorkspaceAccessor workspaceAccessor) { if (bufferProvider == null) { throw new ArgumentNullException(nameof(bufferProvider)); } if (workspaceAccessor == null) { throw new ArgumentNullException(nameof(workspaceAccessor)); } _bufferProvider = bufferProvider; _codeDocumentProvider = workspaceAccessor.Workspace.Services.GetLanguageServices(RazorLanguage.Name).GetRequiredService <TextBufferCodeDocumentProvider>(); }
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>(); }
public DefaultRazorDocumentManager( RazorEditorFactoryService editorFactoryService, TextBufferProjectService projectService, VisualStudioWorkspaceAccessor workspaceAccessor) { if (editorFactoryService == null) { throw new ArgumentNullException(nameof(editorFactoryService)); } if (projectService == null) { throw new ArgumentNullException(nameof(projectService)); } if (workspaceAccessor == null) { throw new ArgumentNullException(nameof(workspaceAccessor)); } _editorFactoryService = editorFactoryService; _projectService = projectService; _foregroundDispatcher = workspaceAccessor.Workspace.Services.GetRequiredService <ForegroundDispatcher>(); }
public DefaultTagHelperCompletionService(VisualStudioWorkspaceAccessor workspaceAccessor) { var razorLanguageServices = workspaceAccessor.Workspace.Services.GetLanguageServices(RazorLanguage.Name); _tagHelperFactsService = razorLanguageServices.GetRequiredService <TagHelperFactsServiceInternal>(); }
public DefaultEditorSettingsManager(VisualStudioWorkspaceAccessor workspaceAccessor) { var razorLanguageServices = workspaceAccessor.Workspace.Services.GetLanguageServices(RazorLanguage.Name); _editorSettingsManager = razorLanguageServices.GetRequiredService <EditorSettingsManagerInternal>(); }