예제 #1
0
 private static void Main()
 {
     Publisher p = new Publisher();
     Subscriber s = new Subscriber();
     s.Listener(p);
     p.Start();
 }
예제 #2
0
 public void Listener(Publisher t)
 {
     t.Tick += new Publisher.TickHandler(this.TimeIs);
 }
예제 #3
0
 public void TimeIs(Publisher t, EventArgs e)
 {
     Console.WriteLine(DateTime.Now);
 }