public void DequeueId(long chatId)
        {
            var senderIndex = QueueList.IndexOf(QueueList.First(item => item.ChatId == chatId));

            QueueList.RemoveAt(senderIndex);
            AlertSubscribers(NotificationEventType.OrderChange, senderIndex);
        }
예제 #2
0
 internal void RemoveTaskFromQueue()
 {
     try
     {
         QueueList.RemoveAt(QueueIndex);
     }
     catch { }
 }
        public void Dequeue([CallerMemberName] string caller = null)
        {
            //_logger.LogError($"DEQUEUE CALLED BY {caller}");

            _LogHelper.Log("S87FD7FDS78DS", $"DEQUEUE CALLED BY {caller}", LogLevel.Trace, true);

            QueueList.RemoveAt(0);
            AlertSubscribers(NotificationEventType.OrderChange, 0);
        }
예제 #4
0
        public void SetQueueCapacity(int capacity)
        {
            if (QueueList.Count > capacity)
            {
                //trim queue list to fit intended capacity of this lane queue
                for (int i = 0; i < QueueList.Count; i++)
                {
                    QueueList.RemoveAt(QueueLane.Capacity + i);
                }
            }

            QueueLane.Capacity = capacity;
        }
예제 #5
0
 /// <summary>
 /// Gets and removes the ticket at the front of the queue, returns null if empty
 /// </summary>
 /// <returns></returns>
 public QueueTicket DequeueTicket()
 {
     if (QueueList.Count != 0)
     {
         var ticketToReturn = QueueList[0];
         QueueList.RemoveAt(0);
         return(ticketToReturn);
     }
     else
     {
         return(null);
     }
 }
예제 #6
0
        public MusicData?Dequeue()
        {
            lock (QueueList)
            {
                if (QueueList.Count == 0)
                {
                    return(null);
                }

                var item = QueueList[0];
                QueueList.RemoveAt(0);
                return(item);
            }
        }
예제 #7
0
        private BuildElement GetQueueHead()
        {
            lock (s_lock)
            {
                if (QueueList.Count <= 0)
                {
                    return(null);
                }

                var item = QueueList[0];
                QueueList.RemoveAt(0);
                return(item);
            }
        }
예제 #8
0
        private RetrospectiveQueueStructure GetQueueHead()
        {
            lock (s_lockObject)
            {
                if (QueueList.Count <= 0)
                {
                    return(null);
                }

                var item = QueueList[0];
                QueueList.RemoveAt(0);
                Logger.WriteLogEntry(TraceEventType.Information, "Patterns Add On Manager, Retrospective Queue, Get QueueHead", "Found next retrospective item");
                return(item);
            }
        }