Example #1
0
 public void ExecuteCommand(OperationType operationCommand)
 {
     if (operationCommand != OperationType.OPERATION_TYPE_NONE)
     {
         _orderCommand = OrderCommandFactory.Get(operationCommand);
         _order.ExecuteCommand(_orderCommand, _tradeItem);
     }
 }
Example #2
0
        public void ExecuteCommand(IOrderTransaction command, TradeTrasaction tradeItem)
        {
            if (command != null)
            {
                command.ExecuteTrasaction(BuyTradeTransactions, SellTradeTransactions, tradeItem);

                //We meet this condition only when OPERATION_TYPE_MODIFY_BUY/OPERATION_TYPE_MODIFY_SELL
                if (tradeItem != null && tradeItem.OperationType != command.Id)
                {
                    OrderCommandFactory.Get(tradeItem.OperationType).ExecuteTrasaction(BuyTradeTransactions, SellTradeTransactions, tradeItem);
                }
            }
        }