/// <summary>Gets or creates a new command with the specified parameters.</summary> /// /// <param name="execute">The execute method for the command.</param> /// <param name="canExecute">The optional canExecute method for the command.</param> /// <param name="commandName">The name of the command to get or set.</param> /// <returns>The existing or created command.</returns> protected IRelayCommand GetCommand(Action execute, Func <bool> canExecute, bool keepTargetAlive = false, [CallerMemberName] string commandName = null) { return(GetCommand(() => relayFactory.Create(execute, canExecute, keepTargetAlive), commandName)); }