Extensions.GetOrAddWithCast<TKey,T,TBase> Method

Definition

public static T GetOrAddWithCast<TKey,T,TBase> (this System.Collections.Concurrent.ConcurrentDictionary<TKey,TBase> dictionary, TKey key, Func<T> add) where T : TBase;
static member GetOrAddWithCast : System.Collections.Concurrent.ConcurrentDictionary<'Key, 'Base> * 'Key * Func<#'Base> -> 'T
<Extension()>
Public Function GetOrAddWithCast(Of TKey, T, TBase) (dictionary As ConcurrentDictionary(Of TKey, TBase), key As TKey, add As Func(Of T)) As T

Type Parameters

TKey
T
TBase

Parameters

dictionary
ConcurrentDictionary<TKey,TBase>
key
TKey
add
Func<T>

Returns

T

Applies to