Class CollectionCaches<T>
Caches collections of a single generic.
Inheritance
Inherited Members
Namespace: GameKit.Dependencies.Utilities
Assembly: GameKit.Dependencies.dll
Syntax
public static class CollectionCaches<T>
Type Parameters
Name | Description |
---|---|
T |
Methods
RetrieveArray()
Retrieves a collection.
Declaration
public static T[] RetrieveArray()
Returns
Type | Description |
---|---|
T[] |
RetrieveBasicQueue()
Retrieves a collection.
Declaration
public static BasicQueue<T> RetrieveBasicQueue()
Returns
Type | Description |
---|---|
BasicQueue<T> |
RetrieveHashSet()
Declaration
public static HashSet<T> RetrieveHashSet()
Returns
Type | Description |
---|---|
System.Collections.Generic.HashSet<T> |
RetrieveHashSet(T)
Retrieves a collection adding one entry.
Declaration
public static HashSet<T> RetrieveHashSet(T entry)
Parameters
Type | Name | Description |
---|---|---|
T | entry |
Returns
Type | Description |
---|---|
System.Collections.Generic.HashSet<T> |
RetrieveList()
Retrieves a collection.
Declaration
public static List<T> RetrieveList()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<T> |
RetrieveList(T)
Retrieves a collection adding one entry.
Declaration
public static List<T> RetrieveList(T entry)
Parameters
Type | Name | Description |
---|---|---|
T | entry |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<T> |
RetrieveQueue()
Retrieves a collection.
Declaration
public static Queue<T> RetrieveQueue()
Returns
Type | Description |
---|---|
System.Collections.Generic.Queue<T> |
RetrieveQueue(T)
Retrieves a collection adding one entry.
Declaration
public static Queue<T> RetrieveQueue(T entry)
Parameters
Type | Name | Description |
---|---|---|
T | entry |
Returns
Type | Description |
---|---|
System.Collections.Generic.Queue<T> |
Store(T[], Int32)
Stores a collection.
Declaration
public static void Store(T[] value, int count)
Parameters
Type | Name | Description |
---|---|---|
T[] | value | Value to store. |
System.Int32 | count | Number of entries in the array from the beginning. |
Store(BasicQueue<T>)
Stores a collection.
Declaration
public static void Store(BasicQueue<T> value)
Parameters
Type | Name | Description |
---|---|---|
BasicQueue<T> | value | Value to store. |
Store(HashSet<T>)
Stores a collection.
Declaration
public static void Store(HashSet<T> value)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.HashSet<T> | value | Value to store. |
Store(List<T>)
Stores a collection.
Declaration
public static void Store(List<T> value)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T> | value | Value to store. |
Store(Queue<T>)
Stores a collection.
Declaration
public static void Store(Queue<T> value)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Queue<T> | value | Value to store. |
StoreAndDefault(ref T[], Int32)
Stores a collection and sets the original reference to default. Method will not execute if value is null.
Declaration
public static void StoreAndDefault(ref T[] value, int count)
Parameters
Type | Name | Description |
---|---|---|
T[] | value | Value to store. |
System.Int32 | count | Number of entries in the array set default, from the beginning. |
StoreAndDefault(ref BasicQueue<T>)
Stores a collection and sets the original reference to default. Method will not execute if value is null.
Declaration
public static void StoreAndDefault(ref BasicQueue<T> value)
Parameters
Type | Name | Description |
---|---|---|
BasicQueue<T> | value | Value to store. |
StoreAndDefault(ref HashSet<T>)
Stores a collection and sets the original reference to default. Method will not execute if value is null.
Declaration
public static void StoreAndDefault(ref HashSet<T> value)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.HashSet<T> | value | Value to store. |
StoreAndDefault(ref List<T>)
Stores a collection and sets the original reference to default. Method will not execute if value is null.
Declaration
public static void StoreAndDefault(ref List<T> value)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T> | value | Value to store. |
StoreAndDefault(ref Queue<T>)
Stores a collection and sets the original reference to default. Method will not execute if value is null.
Declaration
public static void StoreAndDefault(ref Queue<T> value)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Queue<T> | value | Value to store. |