Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SiliconStudio.Core.ServiceRegistry Class Reference

Base implementation for IServiceRegistry More...

Inheritance diagram for SiliconStudio.Core.ServiceRegistry:
SiliconStudio.Core.IServiceRegistry

Public Member Functions

object GetService (Type type)
 Gets the instance service providing a specified service. More...
 
void AddService (Type type, object provider)
 Adds a service to this ServiceRegistry. More...
 
void RemoveService (Type type)
 Removes the object providing a specified service. More...
 

Static Public Attributes

static PropertyKey
< ServiceRegistry
ServiceRegistryKey = new PropertyKey<ServiceRegistry>("ServiceRegistryKey", typeof(ServiceRegistry))
 

Events

EventHandler< ServiceEventArgsServiceAdded
 
EventHandler< ServiceEventArgsServiceRemoved
 
- Events inherited from SiliconStudio.Core.IServiceRegistry
EventHandler< ServiceEventArgsServiceAdded
 Occurs when a new service is added. More...
 
EventHandler< ServiceEventArgsServiceRemoved
 Occurs when when a service is removed. More...
 

Detailed Description

Base implementation for IServiceRegistry

Definition at line 34 of file ServiceRegistry.cs.

Member Function Documentation

void SiliconStudio.Core.ServiceRegistry.AddService ( Type  type,
object  provider 
)

Adds a service to this ServiceRegistry.

Parameters
typeThe type of service to add.
providerThe service provider to add.
Exceptions
System.ArgumentNullExceptiontype;Service type cannot be null
System.ArgumentExceptionService is already registered;type

Implements SiliconStudio.Core.IServiceRegistry.

Definition at line 73 of file ServiceRegistry.cs.

object SiliconStudio.Core.ServiceRegistry.GetService ( Type  type)

Gets the instance service providing a specified service.

Parameters
typeThe type of service.
Returns
The registered instance of this service.
Exceptions
System.ArgumentNullExceptiontype

Definition at line 48 of file ServiceRegistry.cs.

void SiliconStudio.Core.ServiceRegistry.RemoveService ( Type  type)

Removes the object providing a specified service.

Parameters
typeThe type of service.

Implements SiliconStudio.Core.IServiceRegistry.

Definition at line 95 of file ServiceRegistry.cs.

Member Data Documentation

PropertyKey<ServiceRegistry> SiliconStudio.Core.ServiceRegistry.ServiceRegistryKey = new PropertyKey<ServiceRegistry>("ServiceRegistryKey", typeof(ServiceRegistry))
static

Definition at line 36 of file ServiceRegistry.cs.

Event Documentation

EventHandler<ServiceEventArgs> SiliconStudio.Core.ServiceRegistry.ServiceAdded

Definition at line 62 of file ServiceRegistry.cs.

EventHandler<ServiceEventArgs> SiliconStudio.Core.ServiceRegistry.ServiceRemoved

Definition at line 64 of file ServiceRegistry.cs.


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