예제 #1
0
파일: OrderCache.cs 프로젝트: forkme7/MT
        public Order GetOrderById(string orderId)
        {
            if (WaitingForExecutionOrders.TryGetOrderById(orderId, out var result))
            {
                return(result);
            }

            if (ActiveOrders.TryGetOrderById(orderId, out result))
            {
                return(result);
            }

            throw new Exception(string.Format(MtMessages.OrderNotFound, orderId));
        }
예제 #2
0
 public bool TryGetOrderById(string orderId, out Order order)
 {
     return(WaitingForExecutionOrders.TryGetOrderById(orderId, out order) ||
            ActiveOrders.TryGetOrderById(orderId, out order));
 }