Esempio n. 1
0
 static void Main()
 {
     Publish eventPublisher = new Publish();
     new Subscriber("Pesho", eventPublisher); //create subscribers for the event
     new Subscriber("Gosho", eventPublisher);
     eventPublisher.RaiseSampleEvent();
 }
Esempio n. 2
0
 public Subscriber(string name, Publish pub)
 {
     this.Name = name;
     pub.RaiseCustomEvent += HandleCustomEvent;
 }
Esempio n. 3
0
 public Recipient(string name, Publish something)
 {
     this.name              = name;
     something.PublicEvent += this.EventHandler;
 }