public DefaultProjectSnapshotManager( ForegroundDispatcher foregroundDispatcher, ErrorReporter errorReporter, ProjectSnapshotWorker worker, IEnumerable <ProjectSnapshotChangeTrigger> triggers, Workspace workspace) { if (foregroundDispatcher == null) { throw new ArgumentNullException(nameof(foregroundDispatcher)); } if (errorReporter == null) { throw new ArgumentNullException(nameof(errorReporter)); } if (worker == null) { throw new ArgumentNullException(nameof(worker)); } if (triggers == null) { throw new ArgumentNullException(nameof(triggers)); } if (workspace == null) { throw new ArgumentNullException(nameof(workspace)); } _foregroundDispatcher = foregroundDispatcher; _errorReporter = errorReporter; _worker = worker; _triggers = triggers.ToArray(); Workspace = workspace; _projects = new Dictionary <ProjectId, DefaultProjectSnapshot>(); _workerQueue = new ProjectSnapshotWorkerQueue(_foregroundDispatcher, this, worker); for (var i = 0; i < _triggers.Length; i++) { _triggers[i].Initialize(this); } }
public ProjectSnapshotWorkerQueue(ForegroundDispatcher foregroundDispatcher, DefaultProjectSnapshotManager projectManager, ProjectSnapshotWorker projectWorker) { if (foregroundDispatcher == null) { throw new ArgumentNullException(nameof(foregroundDispatcher)); } if (projectManager == null) { throw new ArgumentNullException(nameof(projectManager)); } if (projectWorker == null) { throw new ArgumentNullException(nameof(projectWorker)); } _foregroundDispatcher = foregroundDispatcher; _projectManager = projectManager; _projectWorker = projectWorker; _projects = new Dictionary <string, ProjectSnapshotUpdateContext>(FilePathComparer.Instance); }
public ProjectSnapshotWorkerQueue(ForegroundDispatcher foregroundDispatcher, DefaultProjectSnapshotManager projectManager, ProjectSnapshotWorker projectWorker) { if (foregroundDispatcher == null) { throw new ArgumentNullException(nameof(foregroundDispatcher)); } if (projectManager == null) { throw new ArgumentNullException(nameof(projectManager)); } if (projectWorker == null) { throw new ArgumentNullException(nameof(projectWorker)); } _foregroundDispatcher = foregroundDispatcher; _projectManager = projectManager; _projectWorker = projectWorker; _projects = new Dictionary <ProjectId, Project>(); }