Method ComputeIfAbsent
ComputeIfAbsent<T, TKey>(ISourceCache<T, TKey>, TKey, Func<TKey, T>)
Declaration
public static Optional<T> ComputeIfAbsent<T, TKey>(this ISourceCache<T, TKey> source, TKey key, Func<TKey, T> factory)
Parameters
Type | Name | Description |
---|---|---|
ISourceCache<T, TKey> | source | |
TKey | key | |
Func<TKey, T> | factory |
Returns
Type | Description |
---|---|
Optional<T> |
Type Parameters
Name | Description |
---|---|
T | |
TKey |