DataSourceBase Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Base implementation of the IDataSource interface.
public class DataSourceBase : MixedReality.Toolkit.Data.IDataSource
type DataSourceBase = class
interface IDataSource
Public Class DataSourceBase
Implements IDataSource
- Inheritance
-
DataSourceBase
- Derived
- Implements
Remarks
This base class contains no Unity specific code and can be used as the base for implementing other concrete data source classes.
To make any data source available as a MonoBehavior, see DataSourceGOBase.
Constructors
| Name | Description |
|---|---|
| DataSourceBase() | |
Fields
| Name | Description |
|---|---|
| _dataConsumerKeyPathCounts | |
| _dataKeyPathMapper | |
| _findArrayIndexRegex | |
| _keyPathToDataConsumers | |
Properties
| Name | Description |
|---|---|
| DataController | |
| DataSourceType |
Get the data source type |
Methods
| Name | Description |
|---|---|
| AddDataConsumerListener(String, IDataConsumer) |
Add a new data consumer listener for the specified key path |
| DataChangeSetBegin() |
Begin a data change set. |
| DataChangeSetBeginForKeyPath(String) | |
| DataChangeSetEnd() |
End a data change set. |
| DataChangeSetEndForKeyPath(String) | |
| GetCollectionCount(String) |
If a key path represents a collection, return the number of items in that collection. |
| GetCollectionKeyPathRange(String, Int32, Int32) |
Get an enumerable collection of key path strings for the specified collection index range. |
| GetDeindexedKeyPath(String) |
Get a path where all array indices have been removed. |
| GetNthCollectionKeyPathAt(String, Int32) |
If a key path represents a collection, return a collection key path for the entry at index |
| GetValue(String) |
Get the value associated with the specified key path and prefix |
| GetValueInternal(String) |
Get the value from the data source based on its keypath. |
| IsCollectionAtKeyPath(String) |
Determine if key path represents a data collection |
| IsDataAvailable() |
Is data available in the data source. |
| NotifyAllChanged(DataChangeType, IDataConsumer) |
Notify all listeners that data has changed. |
| NotifyDataChanged(String, Object, DataChangeType, Boolean) |
Inform data source that its data has changed. |
| OnCollectionListenerAdded(String, Object) |
Triggered whenever a datum is added that is a collection |
| OnCollectionListenerRemoved(String) |
Triggered whenever a datum is removed that is a collection. |
| RemoveDataConsumerListener(String, IDataConsumer) |
Remove a data consumer listener for the specified key path |
| ResolveKeyPath(String, String) |
Resolve a key path using a given prefix and local path. |
| SetDataKeyPathMapper(IDataKeyPathMapper) |
Set a key path mapper. |
| SetValue(String, Object, Boolean) |
Set the value associated with the specified key path |
| SetValueInternal(String, Object) |
Set the value in the data source based on its keypath. |