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); }
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(); } } }
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); }
public void Leave(ChannelMember member) { this.members.Remove(member.CID); }
public void Enter(ChannelMember member) { this.members[member.CID] = member; }