BrokerObserver
As for the PropertyObserver or the MementoObserver the BrokerObserver is an easy shortcut to react to message arrivals when using the message broker.
We can use a monitor to trigger, for example, the CanExecuteChanged
event of a ICommand
interface implementation:
What the above code does is to trigger the CanExecuteChanged
logic each time a message of type MySampleMessage
is delivered via the monitored message broker.
Last updated