Skip to content

M_CodeJam_Collections_LazyDictionary_Create__2

andrewvk edited this page Apr 22, 2016 · 9 revisions

LazyDictionary.Create(TKey, TValue) Method (Func(TKey, TValue), Boolean)

[This is preliminary documentation and is subject to change.]

Creates implementation of ILazyDictionary(TKey, TValue).

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

Syntax

C#

public static ILazyDictionary<TKey, TValue> Create<TKey, TValue>(
	Func<TKey, TValue> valueFactory,
	bool threadSafe
)

VB

Public Shared Function Create(Of TKey, TValue) ( 
	valueFactory As Func(Of TKey, TValue),
	threadSafe As Boolean
) As ILazyDictionary(Of TKey, TValue)

F#

static member Create : 
        valueFactory : Func<'TKey, 'TValue> * 
        threadSafe : bool -> ILazyDictionary<'TKey, 'TValue> 

Parameters

 

valueFactory
Type: System.Func(TKey, TValue)
Function to create value on demand.
threadSafe
Type: System.Boolean
If true, creates a thread safe implementation

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