using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.SignalR; using System.Threading.Tasks; namespace HL_FristAidPlatform_Service { /// /// /// public class SignalRSendMildd { /// ///上下文 /// private readonly RequestDelegate _next; private readonly IHubContext _hubContext; /// ///注入上下文 /// /// /// public SignalRSendMildd(RequestDelegate next, IHubContext hubContext) { _next = next; _hubContext = hubContext; } /// /// SignalR过滤 /// /// /// public async Task InvokeAsync(HttpContext context) { await _next(context); } } }