TLazy<T> Class

Provides support for lazy initialization.

Namespace: Spring
TInterfacedObject
  Spring.TLazy
    Spring.TLazy<T>
type
 TLazy<T> = class(TLazy, ILazy<T>, TFunc<T>)
 end;

Type Parameters

T
The type of object that is being lazily initialized.

The TLazy<T> type exposes the following members.

Show:
 NameDescription
Create

Overloaded. Initializes a new instance of the Lazy<T> record. When lazy initialization occurs, the default constructor of the target type is used.

Create(TFunc,Boolean)

Overloaded. Initializes a new instance of the TLazy<T> class. When lazy initialization occurs, the specified initialization function is used.

CreateFrom(T,Boolean)

Initializes a new instance of TLazy<T> with the specified value.

Destroy

Represents the destructor of the TLazy<T> class. (Overrides TLazy.Destroy.)

Top
Show:
 NameDescription
IsValueCreated

Gets a value that indicates whether a value has been created for this TLazy<T> instance. (Inherited from TLazy.)

Value

Gets the lazily initialized value of the current TLazy<T> instance.

Top
Show:
 NameDescription
GetValue

Represents method GetValue.

GetValueNonGeneric

Represents method GetValueNonGeneric. (Overrides TLazy.GetValueNonGeneric.)

InitializeValue

Represents method InitializeValue.

Top
Show:
 NameDescription
fValue

Represents field fValue.

fValueFactory

Represents field fValueFactory.

Top