asp.net mvc - Call SignalR Client method from normal C# class -
I am trying to add signal R to my MVC project. I need to call the signal and client method from my class library. I used the code below. This is not working, but when I try to call another hub class method from WebAP, its work is fine. I want to know that it is possible to call the Signal R client method from the normal C # class? You can find more information in
Public class CommomHubManager: ICommomHubManager {readonly IHubContext References; Public CommomHubManager () {Reference = Helpers. the provider. Hubcontact Provider & lt; Hub Notifications & gt; .HubContext; } Public Action AddUserToGroup (string group name) {Return function. Factor STARTNU ((=) = & gt; {context.Clients.All.addUserToGroup (groupName);}); }}
preference = globalhost.com connectionManager.gatehbkontex & lt; CommmHub Manager & gt; (); Context.Clients.All.Send ("Admin", "Stop Chat");
Comments
Post a Comment