Class BaseServiceManager
Base class providing service registration and management functionality. This class can be used to implement a
custom service management component for one or more services, similar to the MixedRealityToolkit object.
Inheritance
BaseServiceManager
Assembly: cs.temp.dll.dll
public class BaseServiceManager : MonoBehaviour, IMixedRealityServiceRegistrar, MonoBehaviour
Fields
The collection of registered services.
Declaration
protected Dictionary<Type, IMixedRealityService> registeredServices
Field Value
The collection of registered services.
Declaration
protected Dictionary<Type, IMixedRealityService> registeredServices
Field Value
Methods
Declaration
public T GetService<T>(string name = null, bool showLogs = true)
where T : IMixedRealityService
Parameters
Returns
Type Parameters
Declaration
public T GetService<T>(string name = null, bool showLogs = true)
where T : IMixedRealityService
Parameters
Returns
Type Parameters
Declaration
public IReadOnlyList<T> GetServices<T>(string name = null)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
Type |
Description |
IReadOnlyList<T> |
|
Type Parameters
Declaration
public IReadOnlyList<T> GetServices<T>(string name = null)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
Type |
Description |
IReadOnlyList<T> |
|
Type Parameters
Declaration
protected virtual void Initialize<T>(Type concreteType, SupportedPlatforms supportedPlatforms = null, params object[] args)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
Type |
concreteType |
The concrete type of the service to initialize.
|
SupportedPlatforms |
supportedPlatforms |
The platform(s) on which the service is supported.
|
Object[] |
args |
Arguments to provide to the service class constructor.
|
Type Parameters
Name |
Description |
T |
The interface type for the service to be initialized.
|
Declaration
protected virtual void Initialize<T>(Type concreteType, SupportedPlatforms supportedPlatforms = null, params object[] args)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
Type |
concreteType |
The concrete type of the service to initialize.
|
SupportedPlatforms |
supportedPlatforms |
The platform(s) on which the service is supported.
|
Object[] |
args |
Arguments to provide to the service class constructor.
|
Type Parameters
Name |
Description |
T |
The interface type for the service to be initialized.
|
Declaration
public bool IsServiceRegistered<T>(string name = null)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
Type Parameters
Declaration
public bool IsServiceRegistered<T>(string name = null)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
Type Parameters
Declaration
protected virtual void OnDestroy()
Declaration
protected virtual void OnDestroy()
Declaration
protected virtual void OnDisable()
Declaration
protected virtual void OnDisable()
Declaration
protected virtual void OnEnable()
Declaration
protected virtual void OnEnable()
Declaration
public bool RegisterService<T>(T serviceInstance)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
T |
serviceInstance |
|
Returns
Type Parameters
Declaration
public bool RegisterService<T>(T serviceInstance)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
T |
serviceInstance |
|
Returns
Type Parameters
Declaration
public bool RegisterService<T>(Type concreteType, SupportedPlatforms supportedPlatforms = null, params object[] args)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
Type |
concreteType |
|
SupportedPlatforms |
supportedPlatforms |
|
Object[] |
args |
|
Returns
Type Parameters
Declaration
public bool RegisterService<T>(Type concreteType, SupportedPlatforms supportedPlatforms = null, params object[] args)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
Type |
concreteType |
|
SupportedPlatforms |
supportedPlatforms |
|
Object[] |
args |
|
Returns
Type Parameters
Declaration
protected virtual void Uninitialize<T>()
where T : IMixedRealityService
Type Parameters
Name |
Description |
T |
The interface type for the service to uninitialize.
|
Declaration
protected virtual void Uninitialize<T>()
where T : IMixedRealityService
Type Parameters
Name |
Description |
T |
The interface type for the service to uninitialize.
|
Declaration
public bool UnregisterService<T>(T serviceInstance)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
T |
serviceInstance |
|
Returns
Type Parameters
Declaration
public bool UnregisterService<T>(T serviceInstance)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
T |
serviceInstance |
|
Returns
Type Parameters
Declaration
public bool UnregisterService<T>(string name = null)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
Type Parameters
Declaration
public bool UnregisterService<T>(string name = null)
where T : IMixedRealityService
Parameters
Type |
Name |
Description |
String |
name |
|
Returns
Type Parameters
Declaration
protected virtual void Update()
Declaration
protected virtual void Update()
Implements
MonoBehaviour