Example #1
0
 public void RemoveOrder(OrderInstanceModel model)
 {
     lock (guardLock)
     {
         orders.Remove(model.orderID);
     }
 }
Example #2
0
 public int GenerateOrderID(OrderInstanceModel newModel)
 {
     lock (guardLock)
     {
         orders.Add(++primaryKey, newModel);
         return(primaryKey);
     }
 }
Example #3
0
        public OrderInstanceModel GetOrderByID(int id)
        {
            OrderInstanceModel model = null;

            if (orders.TryGetValue(id, out model))
            {
                return(model);
            }
            else
            {
                return(null);
            }
        }