protected override Expression <Func <IReactiveProxy, Task> > VisitObserverOnNextCore(ObserverOnNext operation) { throw new NotImplementedException(); }
protected override Expression <Func <IReactiveProxy, Task> > VisitObserverOnNextCore <T>(ObserverOnNext <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 onNextMethod = boundParameter.Type.GetMethod("OnNextAsync"); return(Expression.Lambda <Func <IReactiveProxy, Task> >( Expression.Call( boundParameter, onNextMethod, Expression.Constant(operation.Value, typeof(T)), Expression.Constant(CancellationToken.None)), thisParameter)); }