Models
The Data Exchange SDK provides three base models that provide basic Data Exchange capabilities which are required in common for models that you intend to read from or write to a Data Exchange. These base models include:
The base models lay a foundation of features that can be extended/used by derived Models.
A Model class derives from any of the preceding base classes and has to override a few mandatory methods and events.
All the base models inherit from BaseExchangeModel that contains common methods and events. These common methods and events include:
- Client reference.
- Common events like BeforeGetExchanges, AfterGetExchanges, BeforeViewExchange and AfterViewExchange.
- Common methods to CopyExchangeLinkAsync and ViewExchangeAsync.
Common Events across Models
- BeforeGetExchanges and AfterGetExchanges: If subscribed to these events, DX SDK calls these methods before and after calling the GetExchangesAsync method respectively.
- BeforeViewExchange and AfterViewExchange: If subscribed to these events, DX SDK calls these methods before and after calling the ViewExchangeAsync method respectively.
Common Methods across Models
- CopyExchangeLinkAsync: Method that contains implementation to copy the ACC URL of the Exchange to clipboard of the user’s machine. The user can paste the link in web browser, or share the complete Exchange URL as plain text.
- ViewExchangeAsync: Method containing implementation to open the Exchange on ACC in the default web browser of the user’s machine.