//=> (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); }
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); }
public int QueueCount(Library.Queue.Priority priority) => _queue[priority].Count();