CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
Csla.LazySingleton< T > Class Template Referencesealed

An alternative to Lazy<T>. More...

Inheritance diagram for Csla.LazySingleton< T >:
Csla.Core.IUseApplicationContext

Public Member Functions

 LazySingleton ()
 Initializes a new instance of the LazySingleton<T> class. Will use the default public constructor to create an instance of T (the value).
 LazySingleton (Func< T > @delegate)
 Initializes a new instance of the LazySingleton<T> class. Will call the supplied delegate to create an instance of T (the value).

Properties

bool IsValueCreated [get]
 Gets a value indicating whether this instance is initialized and contains a value.
Value [get]
 Gets the instance.

Detailed Description

An alternative to Lazy<T>.

Template Parameters
T
Type Constraints
T :class 

Member Function Documentation

◆ LazySingleton() [1/2]

Csla.LazySingleton< T >.LazySingleton ( )
inline

Initializes a new instance of the LazySingleton<T> class. Will use the default public constructor to create an instance of T (the value).

◆ LazySingleton() [2/2]

Csla.LazySingleton< T >.LazySingleton ( Func< T > @ delegate)
inline

Initializes a new instance of the LazySingleton<T> class. Will call the supplied delegate to create an instance of T (the value).

Parameters
delegateFactory delegate used to create the singleton value.
Exceptions
ArgumentNullExceptiondelegate is null.

Property Documentation

◆ IsValueCreated

bool Csla.LazySingleton< T >.IsValueCreated
get

Gets a value indicating whether this instance is initialized and contains a value.

true if this instance is value created; otherwise, false.

◆ Value

T Csla.LazySingleton< T >.Value
get

Gets the instance.

The instance.


The documentation for this class was generated from the following file: