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

 

Initializes a new instance of the Lazy<T, TMetadata> class with the specified metadata and thread safety value 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,
	bool isThreadSafe
)

Parameters

valueFactory
Type: System::Func<T>^

A function that returns the referenced object.

metadata
Type: TMetadata

The metadata associated with the referenced object.

isThreadSafe
Type: System::Boolean

Indicates whether the Lazy<T, TMetadata> object that is created will be thread-safe.

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: