public IObservable <ITransition> Start() => getOldestUnsynced() .SingleAsync() .Select(entity => entity != null ? (ITransition)ChangeFound.Transition(entity) : NoMoreChanges.Transition());
private void RaisePrintReturnCash(ICashSet setToReturn) { string changeNotification = string.Format("Return {0}, distributed as {1}", setToReturn.GetSum().ToString(), setToReturn.AsString()); ChangeFound?.Invoke(this, new ConsolePrintEventArgs(changeNotification)); }
public IObservable <ITransition> Start() => dataSource .Get() .Where(entity => entity.SyncStatus == SyncStatus.SyncNeeded) .SingleOrDefaultAsync() .Select(entity => entity != null ? (ITransition)ChangeFound.Transition(entity) : NoMoreChanges.Transition());
private void RaiseNoChangeFound() { ChangeFound?.Invoke(this, new ConsolePrintEventArgs("Unable to attribute change")); }