public void Attach(MacroData macroData) { _subscription = Observable.Merge(RxApp.DeferredScheduler, macroData.Changed, macroData.Deployment.Changed, macroData.ScreenElements.Changed) .Throttle(TimeSpan.FromSeconds(5.0), RxApp.DeferredScheduler) .Subscribe(p => { _storage.Save(macroData); } ); }
public static void SetCurrent(MacroData currentData) { lock (_lock) { MacroData.Current = currentData; } }