コード例 #1
0
        public override void Send(string from, string to, string message)
        {
            Participant participant = _participants[to];

            if (participant != null)
            {
                participant.Receive(from, message);
            }
        }
コード例 #2
0
        public void Send(Participant from, Participant to, string message)
        {
            if (to != null)
            {
                to.Receive(from, message);
            }

            messages.Add($"{from.name} to {to.name} : {message}");
        }