/// <summary> /// Stops the property updates worker. You will need to call this method when the platform-specific /// implementation of the control is disposed or removed. /// </summary> private void StopPropertyUpdatesWorker() { lock (PropertyUpdatesLock) { PropertyUpdatesWorker?.Stop(); PropertyUpdatesWorker = null; } }
/// <summary> /// Stops the property updates worker. You will need to call this method when the platform-specific /// implementation of the control is disposed or removed. /// </summary> private void StopPropertyUpdatesWorker() { lock (PropertyUpdatesLock) { PropertyUpdatesWorker?.Stop(); PropertyUpdatesWorker = null; } // Ensure one last update UpdateStateProperties(); }
public ObservableQuery(IDataService db) { _db = db; H <ObservableQuery <T> > .Initialize(this); _timer = NotifyHelper.EventHandlerService.GetTimer(); _timer.Tick += async(a, b) => await _timer_TickAsync(a, b); _timer.Interval = TimeSpan.FromMilliseconds(300); Suspender = new Suspender(() => _timer.Stop(), () => _timer.Start()); _token = Suspender.Get(); }