Provides some useful extensions for Queues.
More...
|
static bool | TryDequeue< T > (this Queue< T > queue, out T result) |
| Attempt to Dequeue on the queue (NOT thread-safe). If successful, return true and set the output result.
|
static T | DequeueOrDefault< T > (this Queue< T > queue) |
| Attempt to dequeue or return the default value of T.
|
static T | DequeueOrDefault< T > (this Queue< T > queue, T fallback) |
| Attempt to Dequeue on the queue (NOT thread-safe). If unsuccessful, return the provided fallback value.
|
Provides some useful extensions for Queues.
◆ DequeueOrDefault< T >() [1/2]
T PeanutButter.Utils.QueueExtensions.DequeueOrDefault< T > |
( |
this Queue< T > | queue | ) |
|
|
static |
Attempt to dequeue or return the default value of T.
- Parameters
-
- Template Parameters
-
- Returns
◆ DequeueOrDefault< T >() [2/2]
T PeanutButter.Utils.QueueExtensions.DequeueOrDefault< T > |
( |
this Queue< T > | queue, |
|
|
T | fallback ) |
|
static |
Attempt to Dequeue on the queue (NOT thread-safe). If unsuccessful, return the provided fallback value.
- Parameters
-
- Template Parameters
-
- Returns
◆ TryDequeue< T >()
bool PeanutButter.Utils.QueueExtensions.TryDequeue< T > |
( |
this Queue< T > | queue, |
|
|
out T | result ) |
|
static |
Attempt to Dequeue on the queue (NOT thread-safe). If successful, return true and set the output result.
- Parameters
-
- Template Parameters
-
- Returns
The documentation for this class was generated from the following file:
- source/Utils/PeanutButter.Utils/QueueExtensions.cs