Пример #1
0
        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());
            }
        }
Пример #2
0
 public void ExecuteCommand(OrderCommandTypes type, ItemModel item)
 {
     receiver.ExecuteCommand(GetOrderCommand(type), item);
 }