Language
Edit

DataSourceReflection Class

Definition

A data source that uses reflection to determine the structure of an object, either a struct, a class or a primitive, and makes objects in that structure available using a keypath structure similar to what is used for the DataSourceObjects and DataSourceJson classes.

public class DataSourceReflection : MixedReality.Toolkit.Data.DataSourceBase
type DataSourceReflection = class
    inherit DataSourceBase
Public Class DataSourceReflection
Inherits DataSourceBase
Inheritance
DataSourceReflection

Constructors

Name Description
DataSourceReflection()
DataSourceReflection(Object)

Fields

Name Description
_collectionObservers
_dataConsumerKeyPathCounts (Inherited from DataSourceBase)
_dataKeyPathMapper (Inherited from DataSourceBase)
_dataSourceObject
_findArrayIndexRegex (Inherited from DataSourceBase)
_keyPathToDataConsumers (Inherited from DataSourceBase)
_lruKeyPathToObjectCache
CollectionElementkeyPathPrefixFormat
DefaultLRUCacheSize
DictionaryElementkeyPathPrefixFormat

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)
GetNamedFieldOrPropertyInfo(Type, String)
GetNthCollectionKeyPathAt(String, Int32)

If a key path represents a collection, return a collection key path for the entry at index n.

GetValue(String)

Get the value associated with the specified key path and prefix

(Inherited from DataSourceBase)
GetValueAsArrayKeyPaths(String, Int32, Int32)

Provide an enumerable of resolvedKeypaths for items in a list

GetValueAsDictionaryKeyPaths(IDictionary, String)
GetValueFromFieldOrProperty(Object, MemberInfo)
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.

KeyPathToObject(String)
KeyPathToValueWithMemberInfo(String, MemberInfo, Object)
NotifyAllChanged(DataChangeType, IDataConsumer)

Notify all listeners that data has changed.

(Inherited from DataSourceBase)
NotifyCollectionDataChanged(String, Object, DataChangeType, Boolean)
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

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.

(Inherited from DataSourceBase)
SetDataKeyPathMapper(IDataKeyPathMapper)

Set a key path mapper.

(Inherited from DataSourceBase)
SetDataSourceObject(Object)
SetValue(String, Object, Boolean)

Set the value associated with the specified key path

(Inherited from DataSourceBase)
SetValueFromFieldOrProperty(Object, MemberInfo, Object)
SetValueInternal(String, Object)

Set the value in the data source based on its keypath.

Applies to