//根据指定queueIndex来获取对应的PointQueue public PointQueue GetPointQueueByQueueIndex(int queueIndex) { PointQueue pointQueue = null; PointQueueDict.TryGetValue(queueIndex, out pointQueue); return(pointQueue); }
public void AddPointQueue2Hash(int index, PointQueue pointQueue) { if (pointQueue == null) { return; } if (PointQueueDict.ContainsKey(index) == false) { PointQueueDict.Add(index, pointQueue); } }
//获取未被预约的PointQueue, 顺序 public PointQueue GetNoReservationPointQueue() { if (IsReservation) { return(null); } var enumerator = PointQueueDict.GetEnumerator(); while (enumerator.MoveNext()) { PointQueue pointQueue = enumerator.Current.Value; if (pointQueue.IsProhibited == false && pointQueue.IsReservation == false) { return(pointQueue); } } enumerator.Dispose(); return(null); }