示例#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));
 }