/// <summary>
        /// Creates a new chat room connection
        /// </summary>
        /// <param name="roominfo">The name of the chat room</param>
        /// <returns>The newly created chat connection</returns>
        public ChatConnection CreateNewChatConnection(ChatRoom roominfo)
        {
            ChatConnection retval = new ChatConnection(_parent, _id++, roominfo);

            roominfo.Connection = retval;
            _chatconnections.Add(roominfo);
            return(retval);
        }
 public ChatRoom GetChatByConnection(ChatConnection conn)
 {
     foreach (ChatRoom cri in _chatconnections)
     {
         if (cri.Connection == conn)
         {
             return(cri);
         }
     }
     return(null);
 }
Exemple #3
0
 public ChatRoom GetChatByConnection(ChatConnection conn)
 {
     foreach (ChatRoom cri in _chatconnections)
     {
         if (cri.Connection == conn)
         {
             return cri;
         }
     }
     return null;
 }
Exemple #4
0
 /// <summary>
 /// Creates a new chat room connection
 /// </summary>
 /// <param name="roominfo">The name of the chat room</param>
 /// <returns>The newly created chat connection</returns>
 public ChatConnection CreateNewChatConnection(ChatRoom roominfo)
 {
     ChatConnection retval = new ChatConnection(_parent, _id++, roominfo);
     roominfo.Connection = retval;
     _chatconnections.Add(roominfo);
     return retval;
 }