public Core(FollowValue <T> followValue, IObserver <T> observer) { _observer = observer; truthSub = followValue._truth.Subscribe(truth => { destValue = truth; }, OnError, Complete); currentValue = destValue; if (truthSub != null) { tickSub = t.Subscribe(delta => { currentValue = followValue._follower(currentValue, destValue, delta); observer.OnNext(currentValue); }); } }
public CoreNonObservable(FollowValue <T> followValue, IObserver <T> observer) { destValue = followValue.end; currentValue = followValue.start; tickSub = t.Subscribe(delta => { currentValue = followValue._follower(currentValue, destValue, delta); observer.OnNext(currentValue); if (!currentValue.Equals(destValue)) { return; } observer.OnCompleted(); Dispose(); }); }