コード例 #1
0
 private void TryCreateBrokerOrder(PhysicalOrder physical)
 {
     if (debug)
     {
         log.Debug("Create Broker Order " + physical);
     }
     sentPhysicalOrders++;
     TryAddPhysicalOrder(physical);
     if (physical.Size <= 0)
     {
         throw new ApplicationException("Sorry, order size must be greater than or equal to zero.");
     }
     physicalOrderHandler.OnCreateBrokerOrder(physical);
 }
コード例 #2
0
 public void OnCreateBrokerOrder(PhysicalOrder order)
 {
     if (debug)
     {
         log.Debug("OnCreateBrokerOrder( " + order + ")");
     }
     if (order.Size <= 0)
     {
         throw new ApplicationException("Sorry, Size of order must be greater than zero: " + order);
     }
     CreateBrokerOrder(order);
     ProcessOrders();
     if (confirmOrders != null)
     {
         confirmOrders.OnCreateBrokerOrder(order);
     }
 }