示例#1
0
        public bool RemoveWaitingMember(long cid, ChannelMember member)
        {
            ChannelMember channelMember;

            if (this.waitingMembers.TryGetValue(cid, out channelMember) && channelMember == member)
            {
                this.waitingMembers.Remove(cid);
                return(true);
            }
            return(false);
        }
示例#2
0
 private void newEntity_Used(object sender, EventArgs <IEntityAdapter> e)
 {
     if (e.Value.RemoteCategory == "FrontendServiceCore.FrontendService")
     {
         ChannelMember channelMember = e.Value.Tag as ChannelMember;
         if (channelMember != null && channelMember.ChannelJoined.Entity == e.Value.LocalEntity)
         {
             channelMember.Close();
         }
     }
 }
示例#3
0
 public bool AddWaitingMember(long cid, ChannelMember member)
 {
     if (this.waitingMembers.ContainsKey(cid))
     {
         return(false);
     }
     this.waitingMembers[cid] = member;
     member.Closed           += delegate(object _, EventArgs __)
     {
         this.RemoveWaitingMember(cid, member);
     };
     return(true);
 }
示例#4
0
 public void Leave(ChannelMember member)
 {
     this.members.Remove(member.CID);
 }
示例#5
0
 public void Enter(ChannelMember member)
 {
     this.members[member.CID] = member;
 }