public NotificationController(DataContext context, IMapper mapper, IHttpContextAccessor httpContextAccessor, ILogger <NotificationController> logger, SseService sseService, NotificationService notificationService) { _context = context; _mapper = mapper; _httpContextAccessor = httpContextAccessor; _logger = logger; _sseService = sseService; _notificationService = notificationService; }
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, SseService sseService) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseSwagger(); app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "SSEServer v1")); } sseService.CreateMethodsMap(Assembly.GetExecutingAssembly()); app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseAuthentication(); app.UseCors("CorsPolicy"); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public static async Task Create(this SseService service, HttpContext context, params (string n, string v)[] props)
public SseMiddleWare(RequestDelegate next, SseService sseService) { _sseService = sseService; _next = next; }