/// <summary> /// Initializes a new instance of ProtectedCommand. /// </summary> /// <param name="handler">The action to execute when the command is executed.</param> /// <param name="canExecuteCommand">Whether the command is enabled or not.</param> public ProtectedCommand(Action handler, bool canExecuteCommand = true) { _action = new ProtectedAction(handler); this.CanExecuteCommand = canExecuteCommand; }
/// <summary> /// Initializes a new instance of ProtectedCommand. /// </summary> /// <param name="handler">The action to execute when the command is executed.</param> /// <param name="canExecuteCommand">Whether the command is enabled or not.</param> public ProtectedCommand(Action handler, bool canExecuteCommand = true) { _action = new ProtectedAction(handler); this.CanExecuteCommand = canExecuteCommand; }