Introducing MemBus: Constructing it

as you might have guessed, MemBus isn’t a single class. A number of different responsibilities are tucked nicely behind the IBus interface. Those responsibilities want to be configured, which is done through the BusSetup class.

The BusSetup either takes a class that interacts with, or it allows you to interact directly with the IConfigurableBus.

BusSetup

Let’s talk about those responsibilities by looking at the interface:

IConfigurableBus_interface

 

 

MemBus doesn’t provide you with any singleton or anything. Being essentially a service to your application, it is your responsibility to keep as many instances of IBus as long as you want, although it is likely that you’ll usually have one instance around.