private void OnParticipantUpdated(object sender, ClientEvents.ParticipantEventArgs ea) { if (sender != this.Context.Client) { return; } RaiseParticipantChanged(ea.Multicast, ea.Participant, ParticipantChangedType.Updated); }
private void OnParticipantRemoved(object sender, ClientEvents.ParticipantEventArgs ea) { if (sender != this.Client) { return; } if (ParticipantRemoved != null) { ParticipantRemoved(sender, ea); } }
private void OnParticipantRemoved(object sender, ClientEvents.ParticipantEventArgs ea) { if (sender != this.Context.Client) { return; } RaiseParticipantChanged(ea.Multicast, ea.Participant, ParticipantChangedType.Removed); if (ea.IsLocal) { //这表示本地负责人退出了组播,我们需要移除所有与该模块有关的参数 _participantTrigger.UnRaise((arg) => { var p = arg as ParticipantChangedEventArgs; if (p == null) { return(false); } return(p.Multicast == ea.Multicast); }); } }