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