private void SessionManagerOnAuthenticatedUserConnected(object sender, SessionEventArgs e) { //send notification to everyone that someone has joined _sessionManager.SendToEachChatSessionsExcept( new JoinedUserInfo { User = e.Session.User.ProjectedAs<UserDto>() }, e.Session.User.Id); }
private void SessionManagerOnAuthenticatedUserDisconnected(object sender, SessionEventArgs e) { //send notification to everyone that someone has left _sessionManager.SendToEachChatSessionsExcept( new LeftUserInfo { UserId = e.Session.User.Id }, e.Session.User.Id); }