Class ResolvedDictionary<T, U>
- Namespace
- SunamoCollectionsGeneric.Collections
- Assembly
- SunamoCollectionsGeneric.dll
Dictionary that resolves values using a function when a key is not found
public class ResolvedDictionary<T, U> where T : notnull
Type Parameters
TThe type of keys
UThe type of values
- Inheritance
-
ResolvedDictionary<T, U>
- Inherited Members
- Extension Methods
Properties
Dictionary
Gets or sets the underlying dictionary
public Dictionary<T, U> Dictionary { get; set; }
Property Value
- Dictionary<T, U>
Methods
Get(T, Func<T, U>)
Gets the value for the specified key, using the resolver function if the key is not found
public U Get(T key, Func<T, U> resolver)
Parameters
keyTThe key to look up
resolverFunc<T, U>The function to resolve the value if key is not found
Returns
- U
The value from the dictionary or the resolved value