CSLA.NET 6.0.0
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...

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

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...
 
- Properties inherited from Csla.Core.IUseApplicationContext
ApplicationContext ApplicationContext [getset]
 Gets or sets the current ApplicationContext object. 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 value)

Definition at line 25 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 35 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 46 of file LazySingleton.cs.

◆ Value

T Csla.LazySingleton< T >.Value
get

Gets the instance.

The instance.

Definition at line 55 of file LazySingleton.cs.