tpeczek/Lib.AspNetCore.ServerSentEvents

Add more user friendly way of using/mapping middlewares with custom services

Closed this issue · 0 comments

Currently in order to use/map middleware which uses custom service an instance of this service is required.

.MapServerSentEvents("/sse-notifications", serviceProvider.GetService<NotificationsServerSentEventsService>())

It would be nice to have a generic method which requires only type.

.MapServerSentEvents<NotificationsServerSentEventsService>("/sse-notifications")