コード例 #1
0
 /// <summary>
 ///   Create a new friend conference session
 /// </summary>
 /// <param name = "session"></param>
 public void CreateSession(ChatSession session)
 {
     ChatSessions.Add(session.SessionID, session);
 }
コード例 #2
0
 /// <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;
 }
コード例 #3
0
        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
        }
コード例 #4
0
 public bool CreateSession(ChatSession chatSession)
 {
     return false;
 }