public DefaultVisualStudioDocumentTrackerFactory( TextBufferProjectService projectService, ITextDocumentFactoryService textDocumentFactory, VisualStudioWorkspaceAccessor workspaceAccessor, ImportDocumentManager importDocumentManager) { if (projectService == null) { throw new ArgumentNullException(nameof(projectService)); } if (textDocumentFactory == null) { throw new ArgumentNullException(nameof(textDocumentFactory)); } if (workspaceAccessor == null) { throw new ArgumentNullException(nameof(workspaceAccessor)); } _projectService = projectService; _textDocumentFactory = textDocumentFactory; _workspace = workspaceAccessor.Workspace; _importDocumentManager = importDocumentManager; _foregroundDispatcher = _workspace.Services.GetRequiredService <ForegroundDispatcher>(); var razorLanguageServices = _workspace.Services.GetLanguageServices(RazorLanguage.Name); _projectManager = razorLanguageServices.GetRequiredService <ProjectSnapshotManager>(); _editorSettingsManager = razorLanguageServices.GetRequiredService <EditorSettingsManagerInternal>(); }
public DefaultVisualStudioDocumentTracker( string filePath, string projectPath, ProjectSnapshotManager projectManager, EditorSettingsManagerInternal editorSettingsManager, Workspace workspace, ITextBuffer textBuffer, ImportDocumentManager importDocumentManager) { if (string.IsNullOrEmpty(filePath)) { throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(filePath)); } if (projectPath == null) { throw new ArgumentNullException(nameof(projectPath)); } if (projectManager == null) { throw new ArgumentNullException(nameof(projectManager)); } if (editorSettingsManager == null) { throw new ArgumentNullException(nameof(editorSettingsManager)); } if (workspace == null) { throw new ArgumentNullException(nameof(workspace)); } if (textBuffer == null) { throw new ArgumentNullException(nameof(textBuffer)); } if (importDocumentManager == null) { throw new ArgumentNullException(nameof(importDocumentManager)); } _filePath = filePath; _projectPath = projectPath; _projectManager = projectManager; _editorSettingsManager = editorSettingsManager; _textBuffer = textBuffer; _importDocumentManager = importDocumentManager; _workspace = workspace; // For now we assume that the workspace is the always default VS workspace. _textViews = new List <ITextView>(); }
public DefaultVisualStudioDocumentTrackerFactory( ForegroundDispatcher foregroundDispatcher, ProjectSnapshotManager projectManager, EditorSettingsManagerInternal editorSettingsManager, TextBufferProjectService projectService, ITextDocumentFactoryService textDocumentFactory, ImportDocumentManager importDocumentManager, Workspace workspace) { if (foregroundDispatcher == null) { throw new ArgumentNullException(nameof(foregroundDispatcher)); } if (projectManager == null) { throw new ArgumentNullException(nameof(projectManager)); } if (editorSettingsManager == null) { throw new ArgumentNullException(nameof(editorSettingsManager)); } if (projectService == null) { throw new ArgumentNullException(nameof(projectService)); } if (textDocumentFactory == null) { throw new ArgumentNullException(nameof(textDocumentFactory)); } if (importDocumentManager == null) { throw new ArgumentNullException(nameof(importDocumentManager)); } if (workspace == null) { throw new ArgumentNullException(nameof(workspace)); } _foregroundDispatcher = foregroundDispatcher; _projectManager = projectManager; _editorSettingsManager = editorSettingsManager; _projectService = projectService; _textDocumentFactory = textDocumentFactory; _importDocumentManager = importDocumentManager; _workspace = workspace; }
public DefaultEditorSettingsManager(VisualStudioWorkspaceAccessor workspaceAccessor) { var razorLanguageServices = workspaceAccessor.Workspace.Services.GetLanguageServices(RazorLanguage.Name); _editorSettingsManager = razorLanguageServices.GetRequiredService <EditorSettingsManagerInternal>(); }