Class Lazy<T>
- Namespace
- Dynamitey.DynamicObjects
- Assembly
- Dynamitey.Community.dll
Wraps a Lazy Type; evaluates on first method call
public class Lazy<T> : Lazy, IDynamicMetaObjectProvider, IEquivalentType, IForwarder
Type Parameters
T
- Inheritance
-
Lazy<T>
- Implements
- Inherited Members
Constructors
Lazy(Func<T>)
Initializes a new instance of the Lazy<T> class.
[RequiresUnreferencedCode("System.Lazy<T>'s type parameter requires T to have a public parameterless constructor for trim analysis, regardless of which Lazy<T> constructor overload is actually used; trimming can remove T's parameterless constructor.")]
[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 Lazy(Func<T> valueFactory)
Parameters
valueFactoryFunc<T>The value factory.
Lazy(Lazy<T>)
Initializes a new instance of the Lazy<T> 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.")]
public Lazy(Lazy<T> target)
Parameters
targetLazy<T>The target.
Properties
CallTarget
Gets the call target.
protected override object? CallTarget { get; }
Property Value
- object
The call target.
Methods
GetDynamicMemberNames()
Returns the enumeration of all dynamic member names.
public override IEnumerable<string> GetDynamicMemberNames()
Returns
- IEnumerable<string>
A sequence that contains dynamic member names.