Пример #1
0
        static void Main()
        {
            var notifier = new Notifier();
            var client = new Client(notifier);

            notifier.DoSomething();

            var badClient = new BadClient(notifier);
            notifier.DelegateNotEvent.Invoke();
        }
Пример #2
0
 public BadClient(Notifier notifier)
 {
     notifier.DelegateNotEvent = NotifierDelegateInvoked;
 }
Пример #3
0
 public Client(Notifier notifier)
 {
     notifier.SomethingHappened += NotifierOnSomethingHappened;
 }