protected virtual void OnStatusUpdated() { _currentState = GetCurrentState(); var e = new IndexingServerStateUpdatedEventArgs { State = _currentState }; StateUpdated?.Invoke(this, e); }
public IndexingServer( IDateTimeProvider dateTimeProvider, IFileSystemSnapshotManager fileSystemSnapshotManager, ITaskQueueFactory taskQueueFactory, ISearchEngine searchEngine) { _dateTimeProvider = dateTimeProvider; _fileSystemSnapshotManager = fileSystemSnapshotManager; _stateChangeTaskQueue = taskQueueFactory.CreateQueue("IndexingServer State Change Task Queue"); _fileSystemSnapshotManager.SnapshotScanStarted += FileSystemSnapshotManagerOnSnapshotScanStarted; _fileSystemSnapshotManager.SnapshotScanFinished += FileSystemSnapshotManagerOnSnapshotScanFinished; _fileSystemSnapshotManager.FileSystemWatchPaused += FileSystemSnapshotManagerOnFileSystemWatchPaused; _fileSystemSnapshotManager.FileSystemWatchResumed += FileSystemSnapshotManagerOnFileSystemWatchResumed; searchEngine.FilesLoading += SearchEngineOnFilesLoading; searchEngine.FilesLoaded += SearchEngineOnFilesLoaded; _currentState = GetCurrentState(); }