Interface IMixedRealityServiceRegistrar
Interface for Mixed Reality Toolkit service registration.
Namespace: Microsoft.MixedReality.Toolkit
Assembly: cs.temp.dll.dll
Syntax
public interface IMixedRealityServiceRegistrar
Methods
GetService<T>(String, Boolean)
Gets the instance of the registered service.
Declaration
T GetService<T>(string name = null, bool showLogs = true)
where T : IMixedRealityService
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the service. |
Boolean | showLogs | Indicates whether or not diagnostic logging should be performed in case of an error |
Returns
Type | Description |
---|---|
T | The registered service instance as the requested type. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the service (ex: IMixedRealityBoundarySystem). |
GetService<T>(String, Boolean)
Gets the instance of the registered service.
Declaration
T GetService<T>(string name = null, bool showLogs = true)
where T : IMixedRealityService
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the service. |
Boolean | showLogs | Indicates whether or not diagnostic logging should be performed in case of an error |
Returns
Type | Description |
---|---|
T | The registered service instance as the requested type. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the service (ex: IMixedRealityBoundarySystem). |
GetServices<T>(String)
Gets the collection of the registered service instances matching the requested type.
Declaration
IReadOnlyList<T> GetServices<T>(string name = null)
where T : IMixedRealityService
Parameters
Type | Name | Description |
---|---|---|
String | name | Friendly name of the service. |
Returns
Type | Description |
---|---|
IReadOnlyList<T> | Read-only collection of the service instances, as the requested type. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the service (ex: IMixedRealityBoundarySystem). |
GetServices<T>(String)
Gets the collection of the registered service instances matching the requested type.
Declaration
IReadOnlyList<T> GetServices<T>(string name = null)
where T : IMixedRealityService
Parameters
Type | Name | Description |
---|---|---|
String | name | Friendly name of the service. |
Returns
Type | Description |
---|---|
IReadOnlyList<T> | Read-only collection of the service instances, as the requested type. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the service (ex: IMixedRealityBoundarySystem). |
IsServiceRegistered<T>(String)
Checks to see if a service of the specified type has been registered.
Declaration
bool IsServiceRegistered<T>(string name = null)
where T : IMixedRealityService
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the service. |
Returns
Type | Description |
---|---|
Boolean | True if the service is registered, false otherwise. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the service (ex: IMixedRealityBoundarySystem). |
IsServiceRegistered<T>(String)
Checks to see if a service of the specified type has been registered.
Declaration
bool IsServiceRegistered<T>(string name = null)
where T : IMixedRealityService
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the service. |
Returns
Type | Description |
---|---|
Boolean | True if the service is registered, false otherwise. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the service (ex: IMixedRealityBoundarySystem). |
RegisterService<T>(T)
Registers a service of the specified type.
Declaration
bool RegisterService<T>(T serviceInstance)
where T : IMixedRealityService
Parameters
Type | Name | Description |
---|---|---|
T | serviceInstance | An instance of the service to be registered. |
Returns
Type | Description |
---|---|
Boolean |
Type Parameters
Name | Description |
---|---|
T | The interface type of the service to be registered (ex: IMixedRealityBoundarySystem). |
RegisterService<T>(T)
Registers a service of the specified type.
Declaration
bool RegisterService<T>(T serviceInstance)
where T : IMixedRealityService
Parameters
Type | Name | Description |
---|---|---|
T | serviceInstance | An instance of the service to be registered. |
Returns
Type | Description |
---|---|
Boolean |
Type Parameters
Name | Description |
---|---|
T | The interface type of the service to be registered (ex: IMixedRealityBoundarySystem). |
RegisterService<T>(Type, SupportedPlatforms, Object[])
Registers a service of the specified type.
Declaration
bool RegisterService<T>(Type concreteType, SupportedPlatforms supportedPlatforms = null, params object[] args)
where T : IMixedRealityService
Parameters
Type | Name | Description |
---|---|---|
Type | concreteType | The concrete type to instantiate. |
SupportedPlatforms | supportedPlatforms | The platform(s) on which the service is supported. |
Object[] | args | Optional arguments used when instantiating the concrete type. |
Returns
Type | Description |
---|---|
Boolean | True if the service was successfully registered, false otherwise. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the service to be registered (ex: IMixedRealityBoundarySystem). |
RegisterService<T>(Type, SupportedPlatforms, Object[])
Registers a service of the specified type.
Declaration
bool RegisterService<T>(Type concreteType, SupportedPlatforms supportedPlatforms = null, params object[] args)
where T : IMixedRealityService
Parameters
Type | Name | Description |
---|---|---|
Type | concreteType | The concrete type to instantiate. |
SupportedPlatforms | supportedPlatforms | The platform(s) on which the service is supported. |
Object[] | args | Optional arguments used when instantiating the concrete type. |
Returns
Type | Description |
---|---|
Boolean | True if the service was successfully registered, false otherwise. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the service to be registered (ex: IMixedRealityBoundarySystem). |
UnregisterService<T>(T)
Unregisters a service.
Declaration
bool UnregisterService<T>(T serviceInstance)
where T : IMixedRealityService
Parameters
Type | Name | Description |
---|---|---|
T | serviceInstance |
Returns
Type | Description |
---|---|
Boolean | True if the service was successfully unregistered, false otherwise. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the service to be unregistered (ex: IMixedRealityBoundarySystem). |
UnregisterService<T>(T)
Unregisters a service.
Declaration
bool UnregisterService<T>(T serviceInstance)
where T : IMixedRealityService
Parameters
Type | Name | Description |
---|---|---|
T | serviceInstance |
Returns
Type | Description |
---|---|
Boolean | True if the service was successfully unregistered, false otherwise. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the service to be unregistered (ex: IMixedRealityBoundarySystem). |
UnregisterService<T>(String)
Unregisters a service of the specified type.
Declaration
bool UnregisterService<T>(string name = null)
where T : IMixedRealityService
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the service to unregister. |
Returns
Type | Description |
---|---|
Boolean | True if the service was successfully unregistered, false otherwise. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the service to be unregistered (ex: IMixedRealityBoundarySystem). |
Remarks
If the name argument is not specified, the first instance will be unregistered
UnregisterService<T>(String)
Unregisters a service of the specified type.
Declaration
bool UnregisterService<T>(string name = null)
where T : IMixedRealityService
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the service to unregister. |
Returns
Type | Description |
---|---|
Boolean | True if the service was successfully unregistered, false otherwise. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the service to be unregistered (ex: IMixedRealityBoundarySystem). |
Remarks
If the name argument is not specified, the first instance will be unregistered