Пример #1
0
        //=> (QueueCount(Library.Queue.Priority.VeryHeigh)
        //    + QueueCount(Library.Queue.Priority.High)
        //    + QueueCount(Library.Queue.Priority.Medium)
        //    + QueueCount(Library.Queue.Priority.Normal));

        public int QueueCount(Library.Queue.Priority priority)
        {
            var queueItem  = _queue[priority];
            int queueCount = queueItem.Count();

            return(queueCount);
        }
Пример #2
0
        public Library.Queue.ITransaction <SmsService.Core.Model.QueueItem> Dequeue(Library.Queue.Priority priority, TimeSpan timeSpan)
        {
            var qResult = _queue.Dequeue(priority, timeSpan);

            qResult.Data.TryCount = qResult.Data.TryCount + 1;
            qResult?.Commit();
            return(qResult);
        }
Пример #3
0
 public int QueueCount(Library.Queue.Priority priority)
 => _queue[priority].Count();