Class Singleton<T>
Defines an abstract base class for singleton classes.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Juhta.Net.Common
Assembly: Juhta.Net.dll
Syntax
public abstract class Singleton<T>
Type Parameters
Name | Description |
---|---|
T | Specifies a type to make as singleton. |
Fields
| Improve this Doc View Sources_instance
Stores the Instance property.
Declaration
protected static T s_instance
Field Value
Type | Description |
---|---|
T |
Properties
| Improve this Doc View SourceInstance
Gets the singleton instance of T
.
Declaration
public static T Instance { get; }
Property Value
Type | Description |
---|---|
T |
Methods
| Improve this Doc View SourceResetSingletonInstance()
Sets a null value as the singleton instance.
Declaration
protected void ResetSingletonInstance()
SetSingletonInstance(T)
Sets a specified value as the singleton instance.
Declaration
protected void SetSingletonInstance(T instance)
Parameters
Type | Name | Description |
---|---|---|
T | instance | Specifies an instance of |