public override Task OnDisconnected(bool stopCalled) { SLUser u = UserList.Where(x => x.ConnectionId == Context.ConnectionId).FirstOrDefault(); if (u != null) { UserList.Remove(u); } return(base.OnDisconnected(stopCalled)); }
public override Task OnConnected() { SLUser u = UserList.Where(x => x.ConnectionId == Context.ConnectionId).FirstOrDefault(); if (u == null) { u = new SLUser() { ConnectionId = Context.ConnectionId, UserId = 0, CompanyId = 0 }; UserList.Add(u); } return(base.OnConnected()); }