Пример #1
0
 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);
 }
Пример #2
0
 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);
 }