コード例 #1
0
 private static ExecuteHandler WrapExecute(ExecuteNoArgHandler executeNoArgHandler)
 {
     if (executeNoArgHandler == null)
     {
         throw new ArgumentNullException(nameof(executeNoArgHandler));
     }
     return(parameter => executeNoArgHandler());
 }
コード例 #2
0
 public RelayCommand(ExecuteNoArgHandler execute, CanExecuteNoArgHandler?canExecute = null) :
     this(WrapExecute(execute), WrapCanExecute(canExecute))
 {
 }