Microsoft.VisualStudio.Data.Tools.Package.ModelBus Namespace
Classes
Class | Description | |
---|---|---|
ModelBusMessage | Message that contains a particular Topic and some Content, for example, the latest state of some object model (i.e. SqlSchemaModel) or some changeset | |
ModelBusMessageTopic | The default ModelBusMessageTopic will allow specifying n-part names as the unique identifier. For our message topics (entity designer and database project) we will derive from ModelBusMessageTopic and use different kinds of unique identifiers that won't clash with string-backed ones. TODO adiunni We can probably get rid of this functionality and make this an abstract class | |
ModelBusService | This interface manages interacting with the Model Bus. This class and its members are reserved for internal use and are not intended to be used in your code. The Model Bus manages interactions between publishers and subscribers through topics. The relationships look like: [publisher] 1 - * [topic] * - * [subscriber] That is, the only constraint is that for every topic, there is only one publisher. This constraint allows any client of the ModelBus to call DemandMessage(ModelBusMessageTopic), which will pull the latest message for the corresponding topic. |
Interfaces
Interface | Description | |
---|---|---|
IModelBusPublisher | A ModelBus publisher explicitly allows clients to pull messages of a particular message topic without publishing. For example, the Entity Designer can pull the current state of the SqlSchemaModel without forcing the SqlSchemaModel to be published to all ModelBus clients of the database project. | |
IModelBusService | The ModelBus Service provides: 1. An organized way to identify dependencies between artifacts. 2. A centralized mechanism of driving changes or messages through artifact dependencies. Whether the changes are point edits, explicit refactorings, or settings changes (i.e. connection strings) they will all use the Reference Bus. 3. A cohesive experience for byref/byval semantics. Decoupling communication logic into a separate component allows for a redefinition of byref/byval as opt-in/opt-out (respectively) of the reference bus. The cohesiveness of this architecture can translate into a cohesive user experience, where the ability to move from ?system/user owns this? to ?user owns this? is a common experience across all designers, editors, and projects. 4. Protection from implementation through IoC. The eventing mechanisms can also change within each artifact while the communication via the reference bus is intact. 5. A driver for changes that can be utilized outside of the product for extensibility purposes or unit testing | |
IModelBusSubscriber | Subscriber to the ModelBus. Once registered, a subscriber will receive notifications every time a publisher publishes a message | |
SModelBusService |