Let's say you have a view-model that controls a media player. It has to offer standard control features like Star, Stop, Pause and Resume.
I'm thinking of two ways to design it in the view-model
1st Way : Every action has its own command. - StartCommand - StopCommand - PauseCommand - ResumeCommand
Every button in the view will be bound to it's related command.
2nd way : One single command with different commandparameters. PerformActionCommand and an enumeration that would look like
enum ActionEnum
{
start,
stop,
pause,
resume
}
Which way do you think is preferable and for what reasons ?