Struct Singleton<T>
The singleton.
Inherited Members
Namespace: Platform.Singletons
Assembly: Platform.Singletons.dll
Syntax
public struct Singleton<T>
Type Parameters
| Name | Description |
|---|---|
| T |
Constructors
| Improve this Doc View SourceSingleton(Func<T>)
Initializes a new Singleton instance.
Declaration
public Singleton(Func<T> creator)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<T> | creator | A creator.
|
Properties
| Improve this Doc View SourceInstance
Gets the instance value.
Declaration
public T Instance { get; }
Property Value
| Type | Description |
|---|---|
| T |