I'm trying to wrap my head around the RX, but somewhere my brain explodes :)
What I'm trying to do is call the WCF method async via RX. Nothing special here, but when the WCF method throws an error, I want to recreate the channel and give it another move (maximum 3 times).
What I still have:
var _sc = new Service.Service1Client(); var _observableFunc = Observable.FromAsyncPattern<int, string>(_sc.BeginGetData, _sc.EndGetData); var _observable = _observableFunc(666); var _defered = Observable.Defer(() => _observable);
I played with Catch<TSource, TException> , which allowed me to Catch<TSource, TException> exception and continue with the same observable, therefore giving me what I wanted. The only problem is that it works forever, that is, if I keep throwing exceptions, the thing never stops!
source share