private static ExecuteHandler WrapExecute(ExecuteNoArgHandler executeNoArgHandler) { if (executeNoArgHandler == null) { throw new ArgumentNullException(nameof(executeNoArgHandler)); } return(parameter => executeNoArgHandler()); }
public RelayCommand(ExecuteNoArgHandler execute, CanExecuteNoArgHandler?canExecute = null) : this(WrapExecute(execute), WrapCanExecute(canExecute)) { }