Esempio n. 1
0
 public static IRelayCommand ViewModelExecute(this IExecution sender, IViewModelExecute execute, int timeout, [CallerMemberName] string name = "")
 {
     return(new RelayCommand(async(parameter) =>
     {
         await ViewModelExecute(sender,
                                operations: execute.Operations,
                                handleTimeout: sender.HandleTimeout,
                                handleUnhandledException: sender.HandleUnhandledException,
                                insights: sender.Insights,
                                notifyActivityFinished: sender.NotifyActivityFinished,
                                notifyOfActivity: sender.NotifyOfActivity,
                                timeoutMilliseconds: timeout == -1 ? execute.TimeoutMilliseconds : timeout,
                                name: name,
                                parameter: parameter);
     })
     {
         Timeout = execute.TimeoutMilliseconds
     });
 }
Esempio n. 2
0
        public static IRelayCommand ViewModelExecute(this IExecution sender, IViewModelExecute execute, [CallerMemberName] string name = "")
        {

            return new RelayCommand(async (parameter) =>
            {
                await ViewModelExecute(sender,
                                        operations: execute.Operations,
                                        handleTimeout: sender.HandleTimeout,
                                        handleUnhandledException: sender.HandleUnhandledException,
                                        insights: sender.Insights,
                                        notifyActivityFinished: sender.NotifyActivityFinished,
                                        notifyOfActivity: sender.NotifyOfActivity,
                                        timeoutMilliseconds: execute.TimeoutMilliseconds,
                                        name: name,
                                        parameter: parameter);
            })
            { Timeout = execute.TimeoutMilliseconds };

        }
Esempio n. 3
0
 public static IRelayCommand ViewModelExecute(this IExecution sender, IViewModelExecute execute, [CallerMemberName] string name = "")
 {
     return(ViewModelExecute(sender, execute, -1, name));
 }
Esempio n. 4
0
 public static IRelayCommand ViewModelExecute(this IExecution sender, IViewModelExecute execute, [CallerMemberName] string name = "", object precheck = null)
 {
     return(ViewModelExecute(sender, execute, -1, null, name, precheck));
 }