ChatSession CreateSession(Guid sessionId, ISquiggleEndPoint endpoint) { ChatSession session = new ChatSession(sessionId, chatHost, localEndPoint, endpoint); RegisterSession(session); return(session); }
void RegisterSession(ChatSession session) { session.SessionEnded += (sender, e) => chatSessions.Remove(session); this.chatSessions.Add(session); }