コード例 #1
0
 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);
     }
 }
コード例 #2
0
 public void React(NewMessageEvent e)
 {
     Console.WriteLine("Reaction for NewMessageEvent (Header:{0}, Content:{1}) from student", e.Message.Header, e.Message.Content);
 }