Example #1
0
        public static LocalActionModel Build <T>(IActionView <T> view, Action onSuccess)
        {
            var result = new LocalActionModel(onSuccess);

            view.BindActionAndInitialize(result);
            return(result);
        }
Example #2
0
        public static LocalActionModel Build <T>(IActionView <T> view, Func <Task> localAction, Action onSuccess = null)
        {
            var result = new LocalActionModel(onSuccess, localAction);

            view.BindActionAndInitialize(result);
            return(result);
        }
        public static RemoteActionModel <ResT> Build <WidgetT, ResT>(
            IActionView <WidgetT> view, Func <Task <ResT> > remOper,
            Action <ResT> onSuccessOrNull = null, Action <ResultHolder <ResT> > onFailureOrNull = null)
        {
            var result = new RemoteActionModel <ResT>(remOper, onSuccessOrNull, onFailureOrNull);

            view.BindActionAndInitialize(result);
            return(result);
        }