Show / Hide Table of Contents

Class Singleton<T>

Defines an abstract base class for singleton classes.

Inheritance
System.Object
Singleton<T>
ServiceFactory
Application
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 Source

s_instance

Stores the Instance property.

Declaration
protected static T s_instance
Field Value
Type Description
T

Properties

| Improve this Doc View Source

Instance

Gets the singleton instance of T.

Declaration
public static T Instance { get; }
Property Value
Type Description
T

Methods

| Improve this Doc View Source

ResetSingletonInstance()

Sets a null value as the singleton instance.

Declaration
protected void ResetSingletonInstance()
| Improve this Doc View Source

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 T to be set as the singleton instance.

  • Improve this Doc
  • View Source
Back to top Copyright © 2017-2019 Juha Lähteenmäki
Generated by DocFX