Class BaseDataProviderAccessCoreSystem
Abstract class for core MRTK system with functionality defined for managing and accessing IMixedRealityDataProviders
Inheritance
Implements
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit
Assembly: cs.temp.dll.dll
Syntax
public abstract class BaseDataProviderAccessCoreSystem : BaseCoreSystem, IMixedRealityEventSystem, IMixedRealityService, IDisposable, IMixedRealityDataProviderAccess
Constructors
BaseDataProviderAccessCoreSystem(IMixedRealityServiceRegistrar, BaseMixedRealityProfile)
Declaration
public BaseDataProviderAccessCoreSystem(IMixedRealityServiceRegistrar registrar, BaseMixedRealityProfile profile = null)
Parameters
Type | Name | Description |
---|---|---|
IMixedRealityServiceRegistrar | registrar | |
BaseMixedRealityProfile | profile |
Methods
Enable()
Declaration
public override void Enable()
Overrides
GetDataProvider(String)
Get the data provider that is registered under the specified name.
Declaration
public virtual IMixedRealityDataProvider GetDataProvider(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | The friendly name of the data provider. |
Returns
Type | Description |
---|---|
IMixedRealityDataProvider | The requested data provider, or null if one cannot be found. |
Remarks
If more than one data provider is registered under the specified name, the first will be returned.
GetDataProvider<T>(String)
Get the data provider that is registered under the specified name (optional) and matching the specified type.
Declaration
public virtual T GetDataProvider<T>(string name = null)
where T : IMixedRealityDataProvider
Parameters
Type | Name | Description |
---|---|---|
String | name | The friendly name of the data provider. |
Returns
Type | Description |
---|---|
T | The requested data provider, or null if one cannot be found. |
Type Parameters
Name | Description |
---|---|
T | The desired data provider type. |
Remarks
If more than one data provider is registered under the specified name, the first will be returned.
GetDataProviders()
Gets the collection of registered data providers.
Declaration
public virtual IReadOnlyList<IMixedRealityDataProvider> GetDataProviders()
Returns
Type | Description |
---|---|
IReadOnlyList<IMixedRealityDataProvider> | Read only copy of the list of registered data providers. |
GetDataProviders<T>()
Get the collection of registered observers of the specified type.
Declaration
public virtual IReadOnlyList<T> GetDataProviders<T>()
where T : IMixedRealityDataProvider
Returns
Type | Description |
---|---|
IReadOnlyList<T> | Read-only copy of the list of registered data providers that implement the specified type. |
Type Parameters
Name | Description |
---|---|
T | The desired data provider type |
LateUpdate()
Declaration
public override void LateUpdate()
Overrides
RegisterDataProvider<T>(T)
Registers a service of the specified type.
Declaration
protected bool RegisterDataProvider<T>(T dataProviderInstance)
where T : IMixedRealityDataProvider
Parameters
Type | Name | Description |
---|---|---|
T | dataProviderInstance | An instance of the data provider to be registered. |
Returns
Type | Description |
---|---|
Boolean |
Type Parameters
Name | Description |
---|---|
T | The interface type of the data provider to be registered. |
RegisterDataProvider<T>(Type, SupportedPlatforms, Object[])
Registers a data provider of the specified type.
Declaration
protected bool RegisterDataProvider<T>(Type concreteType, SupportedPlatforms supportedPlatforms = null, params object[] args)
where T : IMixedRealityDataProvider
Parameters
Type | Name | Description |
---|---|---|
Type | concreteType | |
SupportedPlatforms | supportedPlatforms | |
Object[] | args |
Returns
Type | Description |
---|---|
Boolean | True if the data provider was successfully registered, false otherwise. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the data provider to be registered. |
Reset()
Declaration
public override void Reset()
Overrides
UnregisterDataProvider<T>(T)
Unregisters a data provider.
Declaration
protected bool UnregisterDataProvider<T>(T dataProviderInstance)
where T : IMixedRealityDataProvider
Parameters
Type | Name | Description |
---|---|---|
T | dataProviderInstance |
Returns
Type | Description |
---|---|
Boolean | True if the data provider was successfully unregistered, false otherwise. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the data provider to be unregistered. |
UnregisterDataProvider<T>(String)
Unregisters a data provider of the specified type.
Declaration
protected bool UnregisterDataProvider<T>(string name = null)
where T : IMixedRealityDataProvider
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the data provider to unregister. |
Returns
Type | Description |
---|---|
Boolean | True if the data provider was successfully unregistered, false otherwise. |
Type Parameters
Name | Description |
---|---|
T | The interface type of the data provider to be unregistered. |
Remarks
If the name argument is not specified, the first instance will be unregistered
Update()
Declaration
public override void Update()