ProtonNet Server 1.0
An Open Solution for all your socket or web api needs.
Loading...
Searching...
No Matches
XmobiTea.Bean.ISingletonContext Interface Reference

Defines methods for managing singleton instances in the context. More...

Inheritance diagram for XmobiTea.Bean.ISingletonContext:
XmobiTea.Bean.IBeanContext XmobiTea.Bean.BeanContext

Public Member Functions

GetSingleton< T > ()
 Gets a singleton instance of the specified type.
 
object GetSingleton (System.Type type)
 Gets a singleton instance of the specified type.
 
CreateSingleton< T > (params object[] args)
 Creates a singleton instance of the specified type.
 
object CreateSingleton (System.Type type, params object[] args)
 Creates a singleton instance of the specified type.
 
void SetSingleton (object singletonObj, System.Type type)
 Sets a singleton instance for the specified type.
 
void SetSingleton< T > (T singletonObj)
 Sets a singleton instance for the specified type.
 
System.Collections.Generic.IEnumerable< object > GetSingletons ()
 Gets all singleton instances in the context.
 

Detailed Description

Defines methods for managing singleton instances in the context.

Member Function Documentation

◆ CreateSingleton()

object XmobiTea.Bean.ISingletonContext.CreateSingleton ( System.Type type,
params object[] args )

Creates a singleton instance of the specified type.

Parameters
typeThe type of the singleton.
argsThe arguments for the constructor.
Returns
The created singleton instance.

Implemented in XmobiTea.Bean.BeanContext.

◆ CreateSingleton< T >()

T XmobiTea.Bean.ISingletonContext.CreateSingleton< T > ( params object[] args)

Creates a singleton instance of the specified type.

Template Parameters
TThe type of the singleton.
Parameters
argsThe arguments for the constructor.
Returns
The created singleton instance.

Implemented in XmobiTea.Bean.BeanContext.

◆ GetSingleton()

object XmobiTea.Bean.ISingletonContext.GetSingleton ( System.Type type)

Gets a singleton instance of the specified type.

Parameters
typeThe type of the singleton.
Returns
The singleton instance.

Implemented in XmobiTea.Bean.BeanContext.

◆ GetSingleton< T >()

Gets a singleton instance of the specified type.

Template Parameters
TThe type of the singleton.
Returns
The singleton instance.

Implemented in XmobiTea.Bean.BeanContext.

◆ GetSingletons()

System.Collections.Generic.IEnumerable< object > XmobiTea.Bean.ISingletonContext.GetSingletons ( )

Gets all singleton instances in the context.

Returns
An enumeration of all singleton instances.

Implemented in XmobiTea.Bean.BeanContext.

◆ SetSingleton()

void XmobiTea.Bean.ISingletonContext.SetSingleton ( object singletonObj,
System.Type type )

Sets a singleton instance for the specified type.

Parameters
singletonObjThe singleton instance.
typeThe type to associate with the singleton.

Implemented in XmobiTea.Bean.BeanContext.

◆ SetSingleton< T >()

void XmobiTea.Bean.ISingletonContext.SetSingleton< T > ( T singletonObj)

Sets a singleton instance for the specified type.

Template Parameters
TThe type to associate with the singleton.
Parameters
singletonObjThe singleton instance.

Implemented in XmobiTea.Bean.BeanContext.


The documentation for this interface was generated from the following file: