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

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

c# - Call function from DLL -