예제 #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);