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.

  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);}); }}   

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?

  preference = globalhost.com connectionManager.gatehbkontex & lt; CommmHub Manager & gt; (); Context.Clients.All.Send ("Admin", "Stop Chat");   

You can find more information in

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -