public OrderCommand GetOrderCommand(OrderCommandTypes type) { switch (type) { case OrderCommandTypes.CreateCommand: return(new NewOrderCommand()); case OrderCommandTypes.ModifyCommand: return(new ModifyOrderCommand()); case OrderCommandTypes.CancelCommand: return(new CancelOrderCommand()); default: return(new NewOrderCommand()); } }
public void ExecuteCommand(OrderCommandTypes type, ItemModel item) { receiver.ExecuteCommand(GetOrderCommand(type), item); }