コード例 #1
0
        public void Stop()
        {
            if (_state == ServiceState.Stopped)
            {
                return;
            }

            ImageWatcherHelper.DisposeImageWatcher(ref _imageWatcher, _imageWatcher_EndOfFileEventDetected);
            _state = ServiceState.Stopped;
        }
コード例 #2
0
        public void Start()
        {
            if (_state == ServiceState.Started)
            {
                return;
            }

            CheckDirectoriesForNewData();
            ImageWatcherHelper.CreateImageWatcher(out _imageWatcher, ImageExtensions.ToList(), MonitoringPaths, NewPageTimeOut, _imageWatcher_EndOfFileEventDetected);
            _state = ServiceState.Started;
        }
コード例 #3
0
        public void Stop()
        {
            if (_status != ServiceStatus.Waiting)
            {
                return;
            }

            ImageWatcherHelper.DisposeImageWatcher(ref _imageWatcher, _imageWatcher_EndOfFileEventDetected);
            _settingsExchanger.UnSubscribeFromSettingsSender();
            _settingsExchanger.UnSubscribeFromSettingsReceiver();

            _status = ServiceStatus.Stopped;
        }
コード例 #4
0
 public void Create(out IImageWatcher watcher, EndOfFileEventHandler endOfFileEventHandler)
 {
     ImageWatcherHelper.CreateImageWatcher(out watcher, endOfFileEventHandler);
 }