Exemplo n.º 1
0
    //根据指定queueIndex来获取对应的PointQueue
    public PointQueue GetPointQueueByQueueIndex(int queueIndex)
    {
        PointQueue pointQueue = null;

        PointQueueDict.TryGetValue(queueIndex, out pointQueue);
        return(pointQueue);
    }
Exemplo n.º 2
0
 public void AddPointQueue2Hash(int index, PointQueue pointQueue)
 {
     if (pointQueue == null)
     {
         return;
     }
     if (PointQueueDict.ContainsKey(index) == false)
     {
         PointQueueDict.Add(index, pointQueue);
     }
 }
Exemplo n.º 3
0
    //获取未被预约的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);
    }