This document is a guide for developers to the Event Consumer of GrandNode.
Event Consumer allows to attach your own code to many Events placed in application.
In many places is application you can see this code, that uses EventPublisher object and calls its Publish()
You can look at all existing Events here by references (Grand.Services.Events.EventPublisher.Publish)
So let’s say we choose CustomerLoggedInEvent for our Event.
This Event is raised after any user log in application.
All you need is to add one class
With this basic content
Example what you can put in HandleEvent(). Raised Event usually should be redirected to Plugin’s ComputationMethod and its Method.
Once Event is raised, Publish collects all referenced by interface types, and then, calls PublishToConsumer()
PublishToConsumer() calls HandleEvent() Method and passes argument with value that was passed to _eventPublisher.Publish()