Skip to content

Publishing Events

Petar Marinov edited this page Jun 24, 2018 · 2 revisions

Events do not have any special requirements like implementing interface or inheriting base class. Events are published using EventBroker.Publish method.

public class MyEvent
{
    public MyEvent(string message)
    {
        Message = message;
    }

    public string Message { get; }
}
...
eventBroker.Publish(new MyEvent("hello"));