Enhanced C#
Language of your choice: library documentation
|
Represents a pool of objects in which an object is automatically created when requested by its key. More...
Represents a pool of objects in which an object is automatically created when requested by its key.
TKey | Key type. |
TValue | Value type. |
This design assumes that the values in the pool know their own key, so it implements IEnumerable{TValue} rather than IEnumerable{KeyValuePair{TKey,TValue}}.
Properties | |
TValue | this[TKey key] [get] |
Gets or creates the value associated with the specified key. More... | |
Public Member Functions | |
TValue | GetIfExists (TKey key) |
Gets the item with the specified key, if it was created earlier. More... | |
TValue Loyc.Collections.IAutoCreatePool< in TKey, out TValue >.GetIfExists | ( | TKey | key | ) |
Gets the item with the specified key, if it was created earlier.
default(TValue)
if the value has not been created.
|
get |
Gets or creates the value associated with the specified key.
ArgumentOutOfRangeException | The key was not valid for this list. |
key | A key object. |