示例#1
0
        public override void Send(string message, Colleague colleague)
        {
            //if(colleague == this.Colleague1)
            //{
            //    this.Colleague2.HandleNotification(message);
            //}
            //else
            //{
            //    this.Colleague1.HandleNotification(message);
            //}

            //Send everyone notifications except for the creator
            colleagues.Where(c => c != colleague).ToList().ForEach(c => c.HandleNotification(message));
        }
示例#2
0
 public void Register(Colleague colleague)
 {
     colleague.SetMediator(this);
     colleagues.Add(colleague);
 }
示例#3
0
 public abstract void Send(string message, Colleague colleague);