- 
                Notifications
    
You must be signed in to change notification settings  - Fork 35
 
M_CodeJam_Collections_LazyDictionary_Create__2_1
        Andrew Koryavchenko edited this page Jun 17, 2018 
        ·
        9 revisions
      
    Creates implementation of ILazyDictionary(TKey, TValue).
Namespace: CodeJam.Collections
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public static ILazyDictionary<TKey, TValue> Create<TKey, TValue>(
	Func<TKey, TValue> valueFactory,
	IEqualityComparer<TKey> comparer,
	bool threadSafe
)VB
Public Shared Function Create(Of TKey, TValue) ( 
	valueFactory As Func(Of TKey, TValue),
	comparer As IEqualityComparer(Of TKey),
	threadSafe As Boolean
) As ILazyDictionary(Of TKey, TValue)F#
static member Create : 
        valueFactory : Func<'TKey, 'TValue> * 
        comparer : IEqualityComparer<'TKey> * 
        threadSafe : bool -> ILazyDictionary<'TKey, 'TValue> 
- valueFactory
 - Type: System.Func(TKey, TValue)
Function to create value on demand. - comparer
 - Type: System.Collections.Generic.IEqualityComparer(TKey)
Key comparer. - threadSafe
 - Type: System.Boolean
If true, creates a thread safe implementation. valueFactory guaranteed to call only once. 
- TKey
 - Type of key
 - TValue
 - Type of value
 
Type: ILazyDictionary(TKey, TValue)
ILazyDictionary(TKey, TValue) implementation.
LazyDictionary Class
Create Overload
CodeJam.Collections Namespace