📜  GlobalHost.ConnectionManager.GetHubContext core 3.1 - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:51.887000             🧑  作者: Mango

代码示例1
using Microsoft.AspNet.SignalR;
using Microsoft.AspNet.SignalR.Infrastructure;
using Microsoft.AspNet.Mvc;

public class TestController : Controller
{
     private IHubContext testHub;

     public TestController(IConnectionManager connectionManager)
     {
         testHub = connectionManager.GetHubContext();
     }
 .....