Class Singleton<T>
Dummy creational design pattern that ensures only one object of its kind exists and provides a single point of access to it for any other code.
Namespace: GGL.Singleton
Assembly: GGL.dll
Syntax
public class Singleton<T> where T : Singleton<T>, new()
Type Parameters
Name | Description |
---|---|
T | Non-behaviour class |
Remarks
Make sure your class has everything set up throught constructor. And please do not create instance by yourself...
Properties
| Edit this page View SourceInstance
Declaration
public static T Instance { get; }
Property Value
Type | Description |
---|---|
T | Access the instance. If it does not exist, it will be created. |