Beispiel #1
0
 /// <summary>
 ///   Create a new friend conference session
 /// </summary>
 /// <param name = "session"></param>
 public void CreateSession(ChatSession session)
 {
     ChatSessions.Add(session.SessionID, session);
 }
 /// <summary>
 ///   Create a new friend conference session
 /// </summary>
 /// <param name = "session"></param>
 public bool CreateSession(ChatSession session)
 {
     ChatSession oldSession = null;
     if (ChatSessions.TryGetValue(session.SessionID, out oldSession))
         if (GetMemeberCount(session) == 0)
             RemoveSession(session.SessionID);
         else
             return false; //Already have one
     ChatSessions.Add(session.SessionID, session);
     return true;
 }
        private int GetMemeberCount(ChatSession session)
        {
#if (!ISWIN)
            int count = 0;
            foreach (ChatSessionMember member in session.Members)
            {
                if (member.HasBeenAdded) count++;
            }
            return count;
#else
            return session.Members.Count(member => member.HasBeenAdded);
#endif
        }
 public bool CreateSession(ChatSession chatSession)
 {
     return false;
 }