Ejemplo n.º 1
0
 public static IObservable <ParametrizedActionExecuteEventArgs> WhenExecute(this IObservable <ParametrizedAction> source)
 => source.SelectMany(action => action.WhenExecute());
Ejemplo n.º 2
0
 public static IObservable <T> WhenExecute <T>(this SimpleAction simpleAction, Func <SimpleActionExecuteEventArgs, IObservable <T> > retriedExecution)
 => simpleAction.WhenExecute().SelectMany(retriedExecution).Retry(() => simpleAction.Application);
Ejemplo n.º 3
0
 public static IObservable <Unit> WhenExecute(this SimpleAction simpleAction, Action <SimpleActionExecuteEventArgs> retriedExecution)
 => simpleAction.WhenExecute(e => {
     retriedExecution(e);
     return(Observable.Empty <Unit>());
 });
Ejemplo n.º 4
0
 static IObservable <Unit> SendAction(this RestActionOperationAttribute attribute, SimpleAction action)
 => action.WhenExecute().SelectMany(t1 => t1.SelectedObjects.Cast <object>().ToObservable()
                                    .SelectMany(instance => attribute.Send(instance, t1.Action.Application
                                                                           .GetCurrentUser <ICredentialBearer>()))).ToUnit();
Ejemplo n.º 5
0
 public static IObservable <T> WhenExecute <T>(this SimpleAction simpleAction, Func <SimpleActionExecuteEventArgs, IObservable <T> > retriedExecution)
 => simpleAction.WhenExecute().SelectMany(retriedExecution).Retry(() => simpleAction.Application).TakeUntilDeactivated(simpleAction.Controller);