I was following a tutorial for an EventBus in and came across the following Interface:
public interface IEventHandler<in TEvent> : IEventHandler where TEvent : Event
{
Task Handle(TEvent @event);
}
public interface IEventHandler
{
}
Now, I get the generics part and the restriction, but I'm missing the point where the Interface extends itself. It's the first time I've seen it being used like this. What does it accomplish? Can anybody please shed some light on this subject? Thanks!