diff --git a/ICD.Common.Utils/Collections/ScrollQueue.cs b/ICD.Common.Utils/Collections/ScrollQueue.cs index 5b28acd..8f589a9 100644 --- a/ICD.Common.Utils/Collections/ScrollQueue.cs +++ b/ICD.Common.Utils/Collections/ScrollQueue.cs @@ -101,6 +101,24 @@ namespace ICD.Common.Utils.Collections return output; } + /// + /// Dequeues the next item in the queue. Returns false if the queue is empty. + /// + /// + /// + /// + [PublicAPI] + public bool Dequeue(out TContents item) + { + item = default(TContents); + + if (Count == 0) + return false; + + item = Dequeue(); + return true; + } + /// /// Returns the oldest item in the queue. ///