Lazy<T,TMetadata> Lazy<T,TMetadata> Lazy<T,TMetadata> Lazy<T,TMetadata> Constructors

Definition

Overloads

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

Initializes a new instance of the Lazy<T,TMetadata> class with the specified metadata.

Lazy<T,TMetadata>(Func<T>, TMetadata) Lazy<T,TMetadata>(Func<T>, TMetadata) Lazy<T,TMetadata>(Func<T>, TMetadata) Lazy<T,TMetadata>(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.

Lazy<T,TMetadata>(TMetadata, Boolean) Lazy<T,TMetadata>(TMetadata, Boolean) Lazy<T,TMetadata>(TMetadata, Boolean) Lazy<T,TMetadata>(TMetadata, Boolean)

Initializes a new instance of the Lazy<T,TMetadata> class with the specified metadata and thread safety value.

Lazy<T,TMetadata>(TMetadata, LazyThreadSafetyMode) Lazy<T,TMetadata>(TMetadata, LazyThreadSafetyMode) Lazy<T,TMetadata>(TMetadata, LazyThreadSafetyMode) Lazy<T,TMetadata>(TMetadata, LazyThreadSafetyMode)

Initializes a new instance of the Lazy<T,TMetadata> class with the specified metadata and thread synchronization mode.

Lazy<T,TMetadata>(Func<T>, TMetadata, Boolean) Lazy<T,TMetadata>(Func<T>, TMetadata, Boolean) Lazy<T,TMetadata>(Func<T>, TMetadata, Boolean) Lazy<T,TMetadata>(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.

Lazy<T,TMetadata>(Func<T>, TMetadata, LazyThreadSafetyMode) Lazy<T,TMetadata>(Func<T>, TMetadata, LazyThreadSafetyMode) Lazy<T,TMetadata>(Func<T>, TMetadata, LazyThreadSafetyMode) Lazy<T,TMetadata>(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.

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

Initializes a new instance of the Lazy<T,TMetadata> class with the specified metadata.

public:
 Lazy(TMetadata metadata);
public Lazy (TMetadata metadata);
new Lazy<'T, 'Metadata> : 'Metadata -> Lazy<'T, 'Metadata>
Public Sub New (metadata As TMetadata)

Parameters

metadata
TMetadata TMetadata TMetadata TMetadata

The metadata associated with the referenced object.

Lazy<T,TMetadata>(Func<T>, TMetadata) Lazy<T,TMetadata>(Func<T>, TMetadata) Lazy<T,TMetadata>(Func<T>, TMetadata) Lazy<T,TMetadata>(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.

public:
 Lazy(Func<T> ^ valueFactory, TMetadata metadata);
public Lazy (Func<T> valueFactory, TMetadata metadata);
new Lazy<'T, 'Metadata> : Func<'T> * 'Metadata -> Lazy<'T, 'Metadata>
Public Sub New (valueFactory As Func(Of T), metadata As TMetadata)

Parameters

valueFactory
Func<T>

A function that returns the referenced object.

metadata
TMetadata TMetadata TMetadata TMetadata

The metadata associated with the referenced object.

Lazy<T,TMetadata>(TMetadata, Boolean) Lazy<T,TMetadata>(TMetadata, Boolean) Lazy<T,TMetadata>(TMetadata, Boolean) Lazy<T,TMetadata>(TMetadata, Boolean)

Initializes a new instance of the Lazy<T,TMetadata> class with the specified metadata and thread safety value.

public:
 Lazy(TMetadata metadata, bool isThreadSafe);
public Lazy (TMetadata metadata, bool isThreadSafe);
new Lazy<'T, 'Metadata> : 'Metadata * bool -> Lazy<'T, 'Metadata>
Public Sub New (metadata As TMetadata, isThreadSafe As Boolean)

Parameters

metadata
TMetadata TMetadata TMetadata TMetadata

The metadata associated with the referenced object.

isThreadSafe
Boolean Boolean Boolean Boolean

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

Lazy<T,TMetadata>(TMetadata, LazyThreadSafetyMode) Lazy<T,TMetadata>(TMetadata, LazyThreadSafetyMode) Lazy<T,TMetadata>(TMetadata, LazyThreadSafetyMode) Lazy<T,TMetadata>(TMetadata, LazyThreadSafetyMode)

Initializes a new instance of the Lazy<T,TMetadata> class with the specified metadata and thread synchronization mode.

public:
 Lazy(TMetadata metadata, System::Threading::LazyThreadSafetyMode mode);
public Lazy (TMetadata metadata, System.Threading.LazyThreadSafetyMode mode);
new Lazy<'T, 'Metadata> : 'Metadata * System.Threading.LazyThreadSafetyMode -> Lazy<'T, 'Metadata>
Public Sub New (metadata As TMetadata, mode As LazyThreadSafetyMode)

Parameters

metadata
TMetadata TMetadata TMetadata TMetadata

The metadata associated with the referenced object.

Remarks

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

Lazy<T,TMetadata>(Func<T>, TMetadata, Boolean) Lazy<T,TMetadata>(Func<T>, TMetadata, Boolean) Lazy<T,TMetadata>(Func<T>, TMetadata, Boolean) Lazy<T,TMetadata>(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.

public:
 Lazy(Func<T> ^ valueFactory, TMetadata metadata, bool isThreadSafe);
public Lazy (Func<T> valueFactory, TMetadata metadata, bool isThreadSafe);
new Lazy<'T, 'Metadata> : Func<'T> * 'Metadata * bool -> Lazy<'T, 'Metadata>
Public Sub New (valueFactory As Func(Of T), metadata As TMetadata, isThreadSafe As Boolean)

Parameters

valueFactory
Func<T>

A function that returns the referenced object.

metadata
TMetadata TMetadata TMetadata TMetadata

The metadata associated with the referenced object.

isThreadSafe
Boolean Boolean Boolean Boolean

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

Lazy<T,TMetadata>(Func<T>, TMetadata, LazyThreadSafetyMode) Lazy<T,TMetadata>(Func<T>, TMetadata, LazyThreadSafetyMode) Lazy<T,TMetadata>(Func<T>, TMetadata, LazyThreadSafetyMode) Lazy<T,TMetadata>(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.

public:
 Lazy(Func<T> ^ valueFactory, TMetadata metadata, System::Threading::LazyThreadSafetyMode mode);
public Lazy (Func<T> valueFactory, TMetadata metadata, System.Threading.LazyThreadSafetyMode mode);
new Lazy<'T, 'Metadata> : Func<'T> * 'Metadata * System.Threading.LazyThreadSafetyMode -> Lazy<'T, 'Metadata>
Public Sub New (valueFactory As Func(Of T), metadata As TMetadata, mode As LazyThreadSafetyMode)

Parameters

valueFactory
Func<T>

A function that returns the referenced object

metadata
TMetadata TMetadata TMetadata TMetadata

The metadata associated with the referenced object.

Remarks

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

Applies to