How do you get a reference to an ASP.NET Core SignalR hub context outside of a controller?
问题 I have just started using SignalR for ASP.NET Core. I have used SignalR for ASP.NET for a couple of years. I am using: Microsoft.AspNetCore.All 2.0.7 Microsoft.AspNetCore.SignalR 1.0.0-preview2-final Microsoft.AspNetCore.SignalR.Client 1.0.0-preview2-final It appears that in the ASP.NET Core version of SignalR I can no longer use GlobalHost or IConnectionManager to get a reference to a hub context. I can use DI to get a reference to the hub context in a controller without any problems. public