protected override Expression <Func <IReactiveProxy, Task> > VisitObserverOnErrorCore(ObserverOnError operation) { throw new NotImplementedException(); }
protected override Expression <Func <IReactiveProxy, Task> > VisitObserverOnErrorCore <T>(ObserverOnError <T> operation) { var binder = new IdentityAwareBinder(); var boundParameter = binder.Bind(Expression.Parameter(typeof(IAsyncReactiveQbserver <T>), operation.TargetObjectUri.ToCanonicalString())); var thisParameter = FreeVariableScanner.Scan(boundParameter).Single(); var onErrorMethod = boundParameter.Type.GetMethod("OnErrorAsync"); return(Expression.Lambda <Func <IReactiveProxy, Task> >( Expression.Call( boundParameter, onErrorMethod, Expression.Constant(operation.Error, typeof(Exception)), Expression.Constant(CancellationToken.None)), thisParameter)); }