ThreadSafeCacheOptionsBaseCreateInstanceTKey, TValue Method
Namespace: KGySoft.CollectionsAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
protected abstract IThreadSafeCacheAccessor<TKey, TValue> CreateInstance<TKey, TValue>(
Func<TKey, TValue> itemLoader,
IEqualityComparer<TKey>? comparer
)
Protected MustOverride Function CreateInstance(Of TKey, TValue) (
itemLoader As Func(Of TKey, TValue),
comparer As IEqualityComparer(Of TKey)
) As IThreadSafeCacheAccessor(Of TKey, TValue)
protected:
generic<typename TKey, typename TValue>
virtual IThreadSafeCacheAccessor<TKey, TValue>^ CreateInstance(
Func<TKey, TValue>^ itemLoader,
IEqualityComparer<TKey>^ comparer
) abstract
abstract CreateInstance :
itemLoader : Func<'TKey, 'TValue> *
comparer : IEqualityComparer<'TKey> -> IThreadSafeCacheAccessor<'TKey, 'TValue>
- itemLoader FuncTKey, TValue
- A delegate that is invoked when an item is not present in the cache.
- comparer IEqualityComparerTKey
- An IEqualityComparerT instance to be used for comparing keys in the cache instance to create.
When , a default comparer will be used.
- TKey
- The type of the key in the cache.
- TValue
- The type of the value in the cache.
IThreadSafeCacheAccessorTKey,
TValueAn
IThreadSafeCacheAccessorTKey, TValue instance, whose settings are represented by this
ThreadSafeCacheOptionsBase instance.