Пример #1
0
 private void InitializeFileWatcher(string requestKey)
 {
     _watchr?.StopWatching();
     _watchr              = null;
     _watchr              = new ThrottledFileWatcher1();
     _watchr.FileChanged += _watchr_FileChanged;
     _watchr.StartWatching(GetFilePath(requestKey));
 }
Пример #2
0
        public SoloFileWatcherVM(IThrottledFileWatcher throttledFileWatcher,
                                 IChangeSender changeSender)
        {
            _watchr              = throttledFileWatcher;
            Sender               = changeSender;
            _watchr.FileChanged += _watchr_FileChanged;

            StartWatchingCmd = R2Command.Relay(StartWatchingLDB);
            StopWatchingCmd  = R2Command.Relay(StopWatchingLDB);
        }
Пример #3
0
        public FileWatcherVMBase(IThrottledFileWatcher throttledFileWatcher,
                                 SharedLogListVM commonLogListVM)
        {
            _log                 = commonLogListVM;
            _watchr              = throttledFileWatcher;
            _watchr.FileChanged += _watchr_FileChanged;

            StartWatchingCmd = R2Command.Relay(StartWatchingFile);
            StopWatchingCmd  = R2Command.Relay(StopWatchingFile);
        }
Пример #4
0
        private bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    _watchr?.StopWatching();
                    _watchr = null;
                }
                disposedValue = true;
            }
        }
Пример #5
0
 public AppUpdateNotifierVM(IThrottledFileWatcher throttledFileWatcher)
 {
     _watchr              = throttledFileWatcher;
     _watchr.FileChanged += (s, e)
                            => RelaunchNowCmd = R2Command.Relay(CurrentExe.RelaunchApp);
 }
Пример #6
0
 public ClonedCopyExeUpdater(IThrottledFileWatcher throttledFileWatcher)
 {
     ClonedCopy           = CurrentExe.GetFullPath();
     _watchr              = throttledFileWatcher;
     _watchr.FileChanged += OnMasterCopyChanged;
 }
Пример #7
0
 public AppendOnlyDbWatcherVM(IThrottledFileWatcher throttledFileWatcher,
                              SharedLogListVM commonLogListVM)
     : base(throttledFileWatcher, commonLogListVM)
 {
 }
Пример #8
0
 public void RevokeRequest(string requestKey)
 {
     _watchr?.StopWatching();
     _watchr = null;
     File.Delete(GetFilePath(requestKey));
 }
Пример #9
0
 public BinaryFileWatcherVM(IThrottledFileWatcher throttledFileWatcher,
                            SharedLogListVM commonLogListVM)
     : base(throttledFileWatcher, commonLogListVM)
 {
 }