Class ResettableCollectionCaches<T>
Caches collections of a single generic.
Inheritance
Inherited Members
Namespace: GameKit.Dependencies.Utilities
Assembly: GameKit.Dependencies.dll
Syntax
public static class ResettableCollectionCaches<T>
where T : IResettable, new()
Type Parameters
Name | Description |
---|---|
T |
Methods
RetrieveArray()
Retrieves a collection.
Declaration
public static T[] RetrieveArray()
Returns
Type | Description |
---|---|
T[] |
RetrieveHashSet()
Retrieves a collection.
Declaration
public static HashSet<T> RetrieveHashSet()
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> |
RetrieveRingBuffer()
Retrieves a collection.
Declaration
public static ResettableRingBuffer<T> RetrieveRingBuffer()
Returns
Type | Description |
---|---|
ResettableRingBuffer<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(ResettableRingBuffer<T>)
Stores a collection.
Declaration
public static void Store(ResettableRingBuffer<T> value)
Parameters
Type | Name | Description |
---|---|---|
ResettableRingBuffer<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. |
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 from the beginning. |
StoreAndDefault(ref ResettableRingBuffer<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 ResettableRingBuffer<T> value)
Parameters
Type | Name | Description |
---|---|---|
ResettableRingBuffer<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. |