Пример #1
0
 public static void StartInspect(InspectRHub hub, string uniquekey)
 {
     var connectionId = hub.Context.ConnectionId;
     hub.Groups.Add(connectionId, uniquekey);
     _groups.AddOrUpdate(connectionId, new[] { uniquekey },
                         (key, current) => current.Concat(new[] { uniquekey }).ToArray());
 }
Пример #2
0
 public static void OnDisconnected(InspectRHub hub)
 {
     string[] val;
     _groups.TryRemove(hub.Context.ConnectionId, out val);
 }