I\'ve just updated some SignalR references and things have changed somewhat in order to allow for generically typed Hubs Hub
. In the existing examples and
There is now a new overload of GetHubContext that takes two generic parameters. The first is the Hub type like before, but the second generic parameter is TClient (which is the T in Hub
).
Assuming that StockTickerHub is defined as follows:
public class TypedDemoHub : Hub
Then
GlobalHost.ConnectionManager.GetHubContext().Clients
becomes
GlobalHost.ConnectionManager.GetHubContext().Clients
The type returned by the new overload to GetHubContext would be IHubContext
and the Clients property would be IHubConnectionContext
instead of IHubConnectionContext
or IHubConnectionContext
.