Table of Contents

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

T

The type of keys

U

The 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

key T

The key to look up

resolver Func<T, U>

The function to resolve the value if key is not found

Returns

U

The value from the dictionary or the resolved value