public IObservable <T> GetRecords <T>(IIndexKey index, long start = 0, long end = -1) { logger.LogDebug($"GetRecords {start}-{end}"); var indexManager = mainIndexManager.GetManager(index); int batch = BatchSize; return(ObserverHelpers.Batch( indexManager.Count(GetDatabase(), index), (fromIndex, toIndex) => indexManager.GetKeys(GetDatabase(), index, fromIndex, toIndex), GetRecords <T>, batch, start, end)); }
/// <summary> /// Stops all observable updates. /// </summary> public void EndButtonUpdates() { ObserverHelpers.UnsubscribeObservables(this, gasPriceObserver, etherBalanceObserver); }
/// <summary> /// Starts the updates for gas prices and the current ether balance. /// </summary> public void StartButtonUpdates() { releasePurposeButton.onClick.AddListener(ReleasePurpose); ObserverHelpers.SubscribeObservables(this, gasPriceObserver, etherBalanceObserver); }