DataSourceObjects 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.
A data source that manages structured data similar to what can be represented in JSON or XML, in particularly collections, maps and primitives.
It can also manage arbitrary binary data or other complex data types, in the event that a data consumer exists that can consumer the data type, such as JPEG or WAV.
This is a standalone data set that can be populated directly via SetValue() instead of depending on an external data source like a JSON or XML data stream.
Note that SetValue() will automatically fabricate any missing structure such that it can be the sole means of populating even the most complex data set. Note that it is possible to inadvertently create large lists, such as by only creating the 1000th element of a collection.
TODO: Refactor DataSourceJson to use this as its base implementation.
public class DataSourceObjects : MixedReality.Toolkit.Data.DataSourceBase
type DataSourceObjects = class
inherit DataSourceBase
Public Class DataSourceObjects
Inherits DataSourceBase
- Inheritance
Constructors
| Name | Description |
|---|---|
| DataSourceObjects() | |
| DataSourceObjects(DataNodeType, Object) |
Initializes a new instance of a DataSourceObjects class. |
Fields
| Name | Description |
|---|---|
| _arrayTokenRegex | |
| _dataConsumerKeyPathCounts | (Inherited from DataSourceBase) |
| _dataKeyPathMapper | (Inherited from DataSourceBase) |
| _findArrayIndexRegex | (Inherited from DataSourceBase) |
| _keyPathToDataConsumers | (Inherited from DataSourceBase) |
| _keyPathToNodeLookup | |
| _keyTokenRegex | |
| _rootNode | |
| ArrayTokenPattern | |
| CollectionElementkeyPathPrefixFormat | |
| DictionaryElementkeyPathPrefixFormat | |
| KeyTokenPattern | |
Properties
| Name | Description |
|---|---|
| DataController | (Inherited from DataSourceBase) |
| DataSourceType |
Get the data source type (Inherited from DataSourceBase) |
Methods
| Name | Description |
|---|---|
| AddDataConsumerListener(String, IDataConsumer) |
Add a new data consumer listener for the specified key path (Inherited from DataSourceBase) |
| DataChangeSetBegin() |
Begin a data change set. (Inherited from DataSourceBase) |
| DataChangeSetBeginForKeyPath(String) | (Inherited from DataSourceBase) |
| DataChangeSetEnd() |
End a data change set. (Inherited from DataSourceBase) |
| DataChangeSetEndForKeyPath(String) | (Inherited from DataSourceBase) |
| 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. (Inherited from DataSourceBase) |
| 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 (Inherited from DataSourceBase) |
| GetValueAsArrayKeyPaths(String, Int32, Int32) | |
| GetValueAsDictionaryKeyPaths(IDataNode, String) | |
| 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. |
| KeyPathToNode(String, Boolean) | |
| NotifyAllChanged(DataChangeType, IDataConsumer) |
Notify all listeners that data has changed. (Inherited from DataSourceBase) |
| NotifyDataChanged(String, Object, DataChangeType, Boolean) |
Inform data source that its data has changed. (Inherited from DataSourceBase) |
| OnCollectionListenerAdded(String, Object) |
Triggered whenever a datum is added that is a collection (Inherited from DataSourceBase) |
| OnCollectionListenerRemoved(String) |
Triggered whenever a datum is removed that is a collection. (Inherited from DataSourceBase) |
| RemoveDataConsumerListener(String, IDataConsumer) |
Remove a data consumer listener for the specified key path (Inherited from DataSourceBase) |
| ResolveKeyPath(String, String) |
Resolve a key path using a given prefix and local path. (Inherited from DataSourceBase) |
| SetDataKeyPathMapper(IDataKeyPathMapper) |
Set a key path mapper. (Inherited from DataSourceBase) |
| SetValue(String, Object, Boolean) |
Set the value associated with the specified key path (Inherited from DataSourceBase) |
| SetValueInternal(String, Object) |
Set the value in the data source based on its keypath. |