CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.LazySingleton< T > Class Template Reference

An alternative to Lazy<T> More...

Public Member Functions

 LazySingleton ()
 Initializes a new instance of the LazySingleton<T> class. More...
 
 LazySingleton (Func< T > @delegate)
 Initializes a new instance of the LazySingleton<T> class. More...
 

Properties

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

Detailed Description

An alternative to Lazy<T>

Template Parameters
T
Type Constraints
T :class 

Definition at line 10 of file LazySingleton.cs.

Constructor & Destructor Documentation

◆ LazySingleton() [1/2]

Initializes a new instance of the LazySingleton<T> class.

Will use the default public constructor to create an instance of T (the vlaue)

Definition at line 22 of file LazySingleton.cs.

◆ LazySingleton() [2/2]

Csla.LazySingleton< T >.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)

Parameters
delegateThe @delegate.

Definition at line 30 of file LazySingleton.cs.

Property Documentation

◆ IsValueCreated

bool Csla.LazySingleton< T >.IsValueCreated
get

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

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

Definition at line 41 of file LazySingleton.cs.

◆ Value

T Csla.LazySingleton< T >.Value
get

Gets the instance.

The instance.

Definition at line 50 of file LazySingleton.cs.