Table of Contents

Class Lazy

Namespace
Dynamitey.DynamicObjects
Assembly
Dynamitey.Community.dll

Abstract base for the Generic class Lazy<T> with Create<T>(Func<T>) factory methods

public abstract class Lazy : BaseForwarder, IDynamicMetaObjectProvider, IEquivalentType, IForwarder
Inheritance
Lazy
Implements
Derived
Lazy<T>
Inherited Members

Constructors

Lazy(object)

Initializes a new instance of the Lazy class.

[RequiresDynamicCode("Constructing any BaseForwarder-derived type instantiates System.Dynamic.DynamicObject, whose default constructor requires the DLR's runtime code generation; not supported when AOT-compiled.")]
protected Lazy(object target)

Parameters

target object

The target.

Methods

Create<T>(Func<T>)

Creates Lazy based on the specified valuefactory.

[RequiresUnreferencedCode("Calls the annotated Lazy<T>(Func<T>) constructor, which requires T to have a public parameterless constructor for System.Lazy<T>'s trim analysis.")]
[RequiresDynamicCode("Constructing any BaseForwarder-derived type instantiates System.Dynamic.DynamicObject, whose default constructor requires the DLR's runtime code generation; not supported when AOT-compiled.")]
public static dynamic Create<T>(Func<T> valueFactory)

Parameters

valueFactory Func<T>

The value factory.

Returns

dynamic

Type Parameters

T

Create<T>(Lazy<T>)

Creates Lazy based on the specified target.

[RequiresDynamicCode("Constructing any BaseForwarder-derived type instantiates System.Dynamic.DynamicObject, whose default constructor requires the DLR's runtime code generation; not supported when AOT-compiled.")]
public static dynamic Create<T>(Lazy<T> target)

Parameters

target Lazy<T>

The target.

Returns

dynamic

Type Parameters

T