Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Rx Workshop: Programming the Cloud
Jul 16, 2011 at 6:57 AMI got this to work, although I'm not sure if I could have made the action into an anonymous method?
public IDisposable Subscribe(IObserver<R> observer) { GenerateState state = new GenerateState { condition = this.condition, current = this.initial, iterate = this.iterate, observer = observer, resultSelector = this.resultSelector }; Action<GenerateState, Action<GenerateState>> action = (_state, self) => { if (_state.condition(_state.current)) { var result = _state.resultSelector(_state.current); _state.observer.OnNext(result); _state.current = _state.iterate(_state.current); self(_state); } else _state.observer.OnCompleted(); }; return scheduler.Schedule(state, action); }