添加项目文件。
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
/***********************************************************************
|
||||
* Project: CoreCms.Net *
|
||||
* Web: https://CoreCms.Net *
|
||||
* ProjectName: 核心内容管理系统 *
|
||||
* Author: 大灰灰 *
|
||||
* Email: JianWeie@163.com *
|
||||
* CreateTime: 2020-09-06 23:37:04
|
||||
* Description: 暂无
|
||||
***********************************************************************/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CoreCms.Net.Utility.Hub;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
|
||||
namespace CoreCms.Net.Middlewares
|
||||
{
|
||||
/// <summary>
|
||||
/// 中间件
|
||||
/// SignalR发送数据
|
||||
/// </summary>
|
||||
public class SignalRSendMildd
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private readonly RequestDelegate _next;
|
||||
private readonly IHubContext<ChatHub> _hubContext;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="next"></param>
|
||||
/// <param name="hubContext"></param>
|
||||
public SignalRSendMildd(RequestDelegate next, IHubContext<ChatHub> hubContext)
|
||||
{
|
||||
_next = next;
|
||||
_hubContext = hubContext;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task InvokeAsync(HttpContext context)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
await _next(context);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user