Ejemplo n.º 1
0
 public void SetCommand(CommandOption commandOption)
 {
     _command = (commandOption) switch
     {
         CommandOption.Add => new AddCommand(),
         CommandOption.Remove => new RemoveCommand(),
         CommandOption.Edit => new EditCommand(),
         _ => new AddCommand()
     };
 }
Ejemplo n.º 2
0
 public void ExecuteCommand(LibraryCommand command, Book book)
 {
     command.Execute(Books, book);
 }