Class Singleton
Represents the singleton.
Inherited Members
Namespace: Platform.Singletons
Assembly: Platform.Singletons.dll
Syntax
public static class Singleton
Methods
| Improve this Doc View SourceCreate<T>(IFactory<T>)
Creates the factory.
Declaration
public static Singleton<T> Create<T>(IFactory<T> factory)
Parameters
Type | Name | Description |
---|---|---|
IFactory<T> | factory | The factory.
|
Returns
Type | Description |
---|---|
Singleton<T> | A singleton of t
|
Type Parameters
Name | Description |
---|---|
T | The .
|
Create<T>(Func<T>)
Creates the creator.
Declaration
public static Singleton<T> Create<T>(Func<T> creator)
Parameters
Type | Name | Description |
---|---|---|
Func<T> | creator | The creator.
|
Returns
Type | Description |
---|---|
Singleton<T> | A singleton of t
|
Type Parameters
Name | Description |
---|---|
T | The .
|
Get<T>(IFactory<T>)
Gets the factory.
Declaration
public static T Get<T>(IFactory<T> factory)
Parameters
Type | Name | Description |
---|---|---|
IFactory<T> | factory | The factory.
|
Returns
Type | Description |
---|---|
T | The
|
Type Parameters
Name | Description |
---|---|
T | The .
|
Get<T>(Func<T>)
Gets the creator.
Declaration
public static T Get<T>(Func<T> creator)
Parameters
Type | Name | Description |
---|---|---|
Func<T> | creator | The creator.
|
Returns
Type | Description |
---|---|
T | The
|
Type Parameters
Name | Description |
---|---|
T | The .
|