public void Stop() { if (_state == ServiceState.Stopped) { return; } ImageWatcherHelper.DisposeImageWatcher(ref _imageWatcher, _imageWatcher_EndOfFileEventDetected); _state = ServiceState.Stopped; }
public void Start() { if (_state == ServiceState.Started) { return; } CheckDirectoriesForNewData(); ImageWatcherHelper.CreateImageWatcher(out _imageWatcher, ImageExtensions.ToList(), MonitoringPaths, NewPageTimeOut, _imageWatcher_EndOfFileEventDetected); _state = ServiceState.Started; }
public void Stop() { if (_status != ServiceStatus.Waiting) { return; } ImageWatcherHelper.DisposeImageWatcher(ref _imageWatcher, _imageWatcher_EndOfFileEventDetected); _settingsExchanger.UnSubscribeFromSettingsSender(); _settingsExchanger.UnSubscribeFromSettingsReceiver(); _status = ServiceStatus.Stopped; }
public void Create(out IImageWatcher watcher, EndOfFileEventHandler endOfFileEventHandler) { ImageWatcherHelper.CreateImageWatcher(out watcher, endOfFileEventHandler); }