Lazy<'T, 'TMetadata> Constructor (Func<'T>, 'TMetadata, LazyThreadSafetyMode)

 

Initializes a new instance of the Lazy<'T, 'TMetadata> class with the specified metadata and thread synchronization mode that uses the specified function to get the referenced object.

Namespace:   System
Assembly:  System.ComponentModel.Composition (in System.ComponentModel.Composition.dll)

new : 
        valueFactory:Func<'T> *
        metadata:'TMetadata *
        mode:LazyThreadSafetyMode -> Lazy

Parameters

valueFactory
Type: System.Func<'T>

A function that returns the referenced object

metadata
Type: TMetadata

The metadata associated with the referenced object.

mode
Type: System.Threading.LazyThreadSafetyMode

The thread synchronization mode

See LazyThreadSafetyMode for more information on thread synchronization and Lazy<'T, 'TMetadata>.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top
Show: