Class QueueExtensions
Extension methods for
Inheritance
System.Object
QueueExtensions
Namespace: X10D.Collections
Assembly: X10D.dll
Syntax
public static class QueueExtensions : object
Methods
| Improve this Doc View SourceDequeueAll<TElement>(Queue<TElement>)
Removes and returns each element from the queue starting at the beginning, until the queue is empty.
Declaration
public static IEnumerable<TElement> DequeueAll<TElement>(this Queue<TElement> queue)
Parameters
Type | Name | Description |
---|---|---|
Queue<TElement> | queue | The queue from which the elements will be removed. |
Returns
Type | Description |
---|---|
IEnumerable<TElement> |
Type Parameters
Name | Description |
---|---|
TElement | The type of the element. |
EnqueueAll<TElement>(Queue<TElement>, IEnumerable<TElement>)
Adds an enumerable collection of objects to the end of the
Declaration
public static void EnqueueAll<TElement>(this Queue<TElement> queue, IEnumerable<TElement> values)
Parameters
Type | Name | Description |
---|---|---|
Queue<TElement> | queue | The queue to which the elements will be added. |
IEnumerable<TElement> | values | An enumerable collection of elements to enqueue. |
Type Parameters
Name | Description |
---|---|
TElement | The type of the element. |