Ejemplo n.º 1
0
        public override void Send(
            string from, string to, string message)
        {
            Participant participant = _participants[to];

            participant?.Receive(@from, message);
        }
Ejemplo n.º 2
0
        public override void Send(string from, string to, string message)
        {
            Participant participant = _participants[to];

            if (participant != null)
            {
                participant.Receive(from, message);
            }
        }
Ejemplo n.º 3
0
		public override void Send(string a_from, string a_to, string a_message)
		{
			if(a_to == null)
			{
				m_participants
					.ToList()
					.Where(a_kvp => a_kvp.Key != a_from)
					.ToList()
					.ForEach(a_kvp => a_kvp.Value.Receive(a_from, a_message));
				return;
			}
			Participant participant = m_participants[a_to];

			if (participant != null)
			{
				participant.Receive(a_from, a_message);
			}
		}