Exemplo n.º 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));
        }
Exemplo n.º 2
0
 public void Register(Colleague colleague)
 {
     colleague.SetMediator(this);
     colleagues.Add(colleague);
 }
Exemplo n.º 3
0
 public abstract void Send(string message, Colleague colleague);