public void NotifyObservers(NewMessageEvent e) { Console.WriteLine("Notifying all observers about new event (Message header: {0}, Content: {1})", e.Message.Header, e.Message.Content); foreach (var observer in Observers) { observer.React(e); } }
public void React(NewMessageEvent e) { Console.WriteLine("Reaction for NewMessageEvent (Header:{0}, Content:{1}) from student", e.Message.Header, e.Message.Content); }