public static IObservable <Task> DoExecuteUITask <Tin>(this IObservable <Tin> sequence, IViewModel vm, Func <Tin, Task> taskBody) { return(sequence.Select ( inContext => vm.ExecuteTask(taskBody, inContext, false) )); }
public static IObservable <Task> DoExecuteUIBusyTask <Tin>(this IObservable <Tin> sequence, IViewModel vm, Func <Tin, CancellationToken, Task> taskBody, CancellationToken cancellationToken) { return(sequence.Select ( inContext => vm.ExecuteTask(taskBody, inContext, cancellationToken, true) )); }