Ejemplo n.º 1
0
        public virtual 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
            });
        }
Ejemplo n.º 2
0
 protected void InvokeExecuting(CancelCommandEventArgs args)
 {
     Executing?.Invoke(this, args);
 }