private void OnParticipantMessageReceived(Participant participant, string message) { var data = new Message { Name = participant.Name, Body = message }; foreach (var otherParticipant in this.participants.Except(new[] { participant })) { otherParticipant.SendMessage(data); } }
private void OnParticipantDisconnected(Participant participant) { var message = new Message { Name = participant.Name, Body = "So long and thanks for all of the shoes!" }; foreach (var otherParticipant in this.participants.Except(new[] { participant })) { otherParticipant.SendMessage(message); } }