using Connected.Annotations; using Connected.Notifications.Events; using Connected.Notifications.Events.Server; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; [assembly: MicroService(MicroServiceType.Sys)] namespace Connected.Notifications; internal class NotificationsStartup : Startup { public const string EventsHub = "/events"; protected override void OnConfigure(WebApplication app) { app.MapHub(EventsHub); } protected override void OnConfigureServices(IServiceCollection services) { services.AddSingleton(typeof(EventServer)); services.AddSingleton(typeof(EventServerConnection)); services.AddSingleton(typeof(IEventService), typeof(EventService)); services.AddTransient(typeof(EventDispatcher)); } }