The Event Service is meant to be a central and uniform mechanism that allows event publishers/producers to talk to event subscribers/consumers. Its interface (IEventService) is a variation of the classic publish/subscribe pattern and the system implementation can be obtained by resolving the interface from the ObjectFactory.
var eventService = ObjectFactory.Resolve<IEventService>();
Resolving the implementation this way allows its replacement with a custom one, in case this is needed. However, in most cases you can use the default implementation. To make the usage of the Event Service easier in the most common scenarios, the EventHub helper class is introduced, which always resolves the event service implementation and lets it do the real work.
Back To Top