public static Task Dispatch <TViewModel>(this IDispatchableAction <TViewModel> action, TViewModel rootViewModel, object parameter = null) { return(new CommandWrapper <TViewModel>(action, rootViewModel).Dispatch(parameter)); }
public static CommandWrapper <TViewModel> ToCommand <TViewModel>(this IDispatchableAction <TViewModel> action, TViewModel rootViewModel) { return(new CommandWrapper <TViewModel>(action, rootViewModel)); }
public CommandWrapper(IDispatchableAction <TViewModel> action, TViewModel viewModel) { _action = action; _viewModel = viewModel; _canExecute = true; }