protected override Expression <Func <IReactiveProxy, Task> > VisitObserverOnCompletedCore(ObserverOnCompleted operation) { throw new NotImplementedException(); }
protected override Expression <Func <IReactiveProxy, Task> > VisitObserverOnCompletedCore <T>(ObserverOnCompleted <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 onCompletedMethod = boundParameter.Type.GetMethod("OnCompletedAsync"); return(Expression.Lambda <Func <IReactiveProxy, Task> >( Expression.Call( boundParameter, onCompletedMethod, Expression.Constant(CancellationToken.None)), thisParameter)); }