예제 #1
0
 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)
            ));
 }
예제 #2
0
 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)
            ));
 }