IDataSource.NotifyAllChanged(DataChangeType, IDataConsumer) Method
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.
Notify all listeners that data has changed.
public void NotifyAllChanged(MixedReality.Toolkit.Data.DataChangeType dataChangeType = MixedReality.Toolkit.Data.DataChangeType.DatumModified, MixedReality.Toolkit.Data.IDataConsumer whichConsumer = default);
abstract member NotifyAllChanged : MixedReality.Toolkit.Data.DataChangeType * MixedReality.Toolkit.Data.IDataConsumer -> unit
Public Sub NotifyAllChanged (Optional dataChangeType As DataChangeType = MixedReality.Toolkit.Data.DataChangeType.DatumModified, Optional whichConsumer As IDataConsumer = Nothing)
Parameters
- dataChangeType
- DataChangeType
- whichConsumer
- IDataConsumer
Remarks
This method is useful for batching multiple changes before notifying data consumers. An example situation is when initially populating a static dataset before notifying data consumers of the availability of data. For example:
SetValue( keypath1, value1 );
...
SetValue( keypathn, valuen );
DataChangeSetBegin();
NotifyAllChanged();
DataChangeSetEnd();
Note that this currently will be less efficient than triggering changes on individual data items as they occur. In the current implementation, all listeners will be notified even if that particular data items has not actually been changed. In future versions, a list will be maintained of all changed items to make this option more efficient.