Classes that plug into the startup/shutdown sequence are invoked just after the endpoint instance has been started and just before it is stopped. Use this approach for any tasks that need to execute with the same life-cycle as the endpoint instance.
IWantToRunWhenBusStartsAndStopsinterface is no longer available.
When self-hosting, there are several options for equivalent behavior:
- Writing code in the endpoint class after start and stop
- Using MEF or Reflection to run code at startup and shutdown in a pluggable way.