Пример #1
0
 public static Task Dispatch <TViewModel>(this IDispatchableAction <TViewModel> action, TViewModel rootViewModel, object parameter = null)
 {
     return(new CommandWrapper <TViewModel>(action, rootViewModel).Dispatch(parameter));
 }
Пример #2
0
 public static CommandWrapper <TViewModel> ToCommand <TViewModel>(this IDispatchableAction <TViewModel> action, TViewModel rootViewModel)
 {
     return(new CommandWrapper <TViewModel>(action, rootViewModel));
 }
Пример #3
0
 public CommandWrapper(IDispatchableAction <TViewModel> action, TViewModel viewModel)
 {
     _action     = action;
     _viewModel  = viewModel;
     _canExecute = true;
 }