Skip to content

M_CodeJam_Collections_LazyDictionary_Create__2_2

Andrew Koryavchenko edited this page Jun 17, 2018 · 3 revisions

LazyDictionary.Create(TKey, TValue) Method (Func(TKey, TValue), IEqualityComparer(TKey), LazyThreadSafetyMode)

Creates implementation of ILazyDictionary(TKey, TValue).

Namespace: CodeJam.Collections
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public static ILazyDictionary<TKey, TValue> Create<TKey, TValue>(
	Func<TKey, TValue> valueFactory,
	IEqualityComparer<TKey> comparer,
	LazyThreadSafetyMode threadSafety
)

VB

Public Shared Function Create(Of TKey, TValue) ( 
	valueFactory As Func(Of TKey, TValue),
	comparer As IEqualityComparer(Of TKey),
	threadSafety As LazyThreadSafetyMode
) As ILazyDictionary(Of TKey, TValue)

F#

static member Create : 
        valueFactory : Func<'TKey, 'TValue> * 
        comparer : IEqualityComparer<'TKey> * 
        threadSafety : LazyThreadSafetyMode -> ILazyDictionary<'TKey, 'TValue> 

Parameters

 

valueFactory
Type: System.Func(TKey, TValue)
Function to create value on demand.
comparer
Type: System.Collections.Generic.IEqualityComparer(TKey)
Key comparer.
threadSafety
Type: System.Threading.LazyThreadSafetyMode
One of the enumeration values that specifies the thread safety mode.

Type Parameters

 

TKey
Type of key
TValue
Type of value

Return Value

Type: ILazyDictionary(TKey, TValue)
ILazyDictionary(TKey, TValue) implementation.

See Also

Reference

LazyDictionary Class
Create Overload
CodeJam.Collections Namespace

Clone this wiki locally