Class QueuePool<T>
Defines a system used to store and retrieve System.Collections.Generic.Queue<T> objects.
Inheritance
System.Object
QueuePool<T>
Implements
IPool<System.Collections.Generic.Queue<T>>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Exiled.API.Features.Pools
Assembly: Exiled.API.dll
Syntax
public class QueuePool<T> : IPool<Queue<T>>
Type Parameters
Name | Description |
---|---|
T | The type of the objects in the list. |
Properties
| Improve this Doc View SourcePool
Gets a QueuePool<T> that stores lists.
Declaration
public static QueuePool<T> Pool { get; }
Property Value
Type | Description |
---|---|
QueuePool<T> |
Methods
| Improve this Doc View SourceGet()
Declaration
public Queue<T> Get()
Returns
Type | Description |
---|---|
System.Collections.Generic.Queue<T> |
Get(IEnumerable<T>)
Retrieves a stored object of type System.Collections.Generic.List<T>, or creates it if it does not exist. The list will be filled with all the provided items
.
Declaration
public Queue<T> Get(IEnumerable<T> items)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | items | The items to fill the list with. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Queue<T> | The stored object, or a new object, of type System.Collections.Generic.List<T>. |
Return(Queue<T>)
Declaration
public void Return(Queue<T> obj)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Queue<T> | obj |
ToArrayReturn(Queue<T>)
Returns the System.Collections.Generic.Queue<T> to the pool and returns its contents as an array.
Declaration
public T[] ToArrayReturn(Queue<T> obj)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Queue<T> | obj | The System.Collections.Generic.Queue<T> to return. |
Returns
Type | Description |
---|---|
T[] | The contents of the returned queue as an array. |
Implements
Extension Methods
See Also
DictionaryPool<TKey, TValue>
HashSetPool<T>