-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Hi, I found an issue that if you have for example this wrapper:
private static readonly IEventBus EventBus;
public static void Publish(EventBase message)
{
EventBus.Publish(message);
}
// in another class
EventBusWrapper.Publish(new Payload(payload))
EventBus cannot find any event except EventBase.
But if you declare the method as below, everything works as should:
public static void Publish<T>(T message) where T : EventBase
{
EventBus.Publish(message);
}
I spent a few hours to find a root cause. Maybe it saves time for others.
alessandrofrancesconi
Metadata
Metadata
Assignees
Labels
No labels