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)); }
public bool TryGetOrderById(string orderId, out Order order) { return(WaitingForExecutionOrders.TryGetOrderById(orderId, out order) || ActiveOrders.TryGetOrderById(orderId, out order)); }