Beispiel #1
0
        private List <AlarmCacheObject> PopAlarm()
        {
            List <AlarmCacheObject> cacheObjects = new List <AlarmCacheObject>();

            for (int i = 0; i < MaxInsertNumber; i++)
            {
                AlarmCacheObject result = null;
                if (AlarmCache.TryPop(out result))
                {
                    cacheObjects.Add(result);
                }
                else//如果没有则终止
                {
                    break;
                }
            }
            return(cacheObjects);
        }
Beispiel #2
0
 public void Push(AlarmCacheObject cacheObject)
 {
     AlarmCache.Push(cacheObject);
 }