IDataConsumer Interface
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.
Interface for all data consumers.
public interface IDataConsumer
type IDataConsumer = interface
Public Interface IDataConsumer
- Derived
Remarks
A data consumer is the intermediary between a data source and a view used to present information. The view will typically be a prefab where specific pieces of information identify which datum will be used to modify that presented information at runtime.
Key Concepts:
Key Path (string) - See IDataSource for more information. A key path identifies a specific datum in the data source. That datum may be a primitive, or an entire data subset.
Change Set - A grouping of data changes. All data source notifications of changed data will be within a Change Set. This allows for multiple related changes to be grouped into one atomic update of a data view. This is critical when multiple data items influence a single piece of presented information, like a single sentence with 3 pieces of variable information.
Data Change Notifications - All changes to a data source are provide via change notifications. Every data consumer can sign up to listen or any number of data changes to specific data items within the data source. Also multiple consumers can listen to the same data source.
For data that represents a collection or list of items, a data consumer can request specific subsets of that list. This allows for pagination and for virtualization, which is critical for supporting large data sets.
Methods
| Name | Description |
|---|---|
| Attach(Dictionary<String,IDataSource>, IDataController, String) |
Prepare this data consumer for use and attach to the provided external resources. |
| DataChangeSetBegin(IDataSource) |
Mark beginning of a related set of data changes. |
| DataChangeSetEnd(IDataSource) |
Mark beginning of a related set of data changes. |
| Detach() |
Detach this data consumer and prepare to return to object pool. |
| IsAttached() |
Tell whether attached to a DataSource. |
| NotifyDataChanged(IDataSource, String, Object, DataChangeType) |
Notification of a data change. |