private void InvokeExecuting(CancelCommandEventArgs args) { if (Executing != null) { Executing(this, args); } }
public void DoExecute(object param) { CancelCommandEventArgs args = new CancelCommandEventArgs() { Parameter = param, Cancel = false }; InvokeExecuting(args); if (args.Cancel) { return; } InvokeAction(param); InvokeExecuted(new CommandEventArgs() { Parameter = param }); }