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

 

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

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

public Lazy(
	Func<T> valueFactory,
	TMetadata metadata
)

Parameters

valueFactory
Type: System.Func<T>

A function that returns the referenced object.

metadata
Type: TMetadata

The metadata associated with the referenced object.

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: