Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 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);
     }
 }