MemBus extension points
ISubscription
This is the basic structure of a subscription. There is also a typed version:
If you want to write a handler, you can inherit from the Handles class:
How can you introduce subscriptions into MemBus apart from method-based subscriptions? In the setup, either directly through _IConfigurableBus.AddSubscription(ISubscription subscription) _or more universal by adding an implementation of
ISubscriptionResolver
A resolver must provide subscriptions for a given message and it may accept subscriptions. The boolean return value states whether the subscription was accepted or not.
IPublishPipelineMember
The “act” of publishing is the execution of the publish pipeline, which may consist of many pipeline members. You can participate in the publishing pipeline by implementing the above interface.
ISubscriptionShaper
This allows you to provide instances that “shape” subscriptions. This interface is best explained by an example:
Consider that a subscription can interact with another instance implementing ISubscription in the “Push” method. A shaper is the abstraction of enhacing an existing subscription. It is used internally for making a subscription disposable, making it filtered, making it dispatch on the UI, etc.