private void InitializeFileWatcher(string requestKey) { _watchr?.StopWatching(); _watchr = null; _watchr = new ThrottledFileWatcher1(); _watchr.FileChanged += _watchr_FileChanged; _watchr.StartWatching(GetFilePath(requestKey)); }
public SoloFileWatcherVM(IThrottledFileWatcher throttledFileWatcher, IChangeSender changeSender) { _watchr = throttledFileWatcher; Sender = changeSender; _watchr.FileChanged += _watchr_FileChanged; StartWatchingCmd = R2Command.Relay(StartWatchingLDB); StopWatchingCmd = R2Command.Relay(StopWatchingLDB); }
public FileWatcherVMBase(IThrottledFileWatcher throttledFileWatcher, SharedLogListVM commonLogListVM) { _log = commonLogListVM; _watchr = throttledFileWatcher; _watchr.FileChanged += _watchr_FileChanged; StartWatchingCmd = R2Command.Relay(StartWatchingFile); StopWatchingCmd = R2Command.Relay(StopWatchingFile); }
private bool disposedValue = false; // To detect redundant calls protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { _watchr?.StopWatching(); _watchr = null; } disposedValue = true; } }
public AppUpdateNotifierVM(IThrottledFileWatcher throttledFileWatcher) { _watchr = throttledFileWatcher; _watchr.FileChanged += (s, e) => RelaunchNowCmd = R2Command.Relay(CurrentExe.RelaunchApp); }
public ClonedCopyExeUpdater(IThrottledFileWatcher throttledFileWatcher) { ClonedCopy = CurrentExe.GetFullPath(); _watchr = throttledFileWatcher; _watchr.FileChanged += OnMasterCopyChanged; }
public AppendOnlyDbWatcherVM(IThrottledFileWatcher throttledFileWatcher, SharedLogListVM commonLogListVM) : base(throttledFileWatcher, commonLogListVM) { }
public void RevokeRequest(string requestKey) { _watchr?.StopWatching(); _watchr = null; File.Delete(GetFilePath(requestKey)); }
public BinaryFileWatcherVM(IThrottledFileWatcher throttledFileWatcher, SharedLogListVM commonLogListVM) : base(throttledFileWatcher, commonLogListVM) { }