I am new to .NET SignalR. I see most of online SignlaR examples for beginners, in a custom Hub class, there is a straight forward way to create custom Hub methods in a derived Hub class without using IHubContext object in those Hub methods. Under which circumstance should I use IHubContext object? Thank you for your help.
Asked
Active
Viewed 199 times
0
-
Did any of the answers below answer your question or are you looking for something else? – Mark C. Oct 09 '16 at 23:57
1 Answers
0
There is a newer way to get the hub
DefaultHubManager hd = new DefaultHubManager(GlobalHost.DependencyResolver);
var hub = hd.ResolveHub("AdminHub") as AdminHub;
hub.SendMessage("woohoo");
This will resolve your to your concrete hub object.

Kelso Sharp
- 972
- 8
- 12