private static IHubConnectionContext <dynamic> GetClients(AlgoHub nub) { if (nub == null) { return(GlobalHost.ConnectionManager.GetHubContext <AlgoHub>().Clients); } else { return(nub.Clients); } }
public static void SendUnsorted(int[] numbers, AlgoHub hub, string connId) { IHubConnectionContext <dynamic> clients = GetClients(hub); clients.Client(connId).UpdateChart1(numbers); }