Esempio n. 1
0
 public void Run()
 {
     MailManager mailManager = new MailManager();
     Fax fax = new Fax(mailManager);
     mailManager.SimulateNewMail("Pavel", "Katya", "Hello, world!");
     fax.Unregister(mailManager);
 }
Esempio n. 2
0
        public void Run()
        {
            MailManager mailManager = new MailManager();
            Fax         fax         = new Fax(mailManager);

            mailManager.SimulateNewMail("Pavel", "Katya", "Hello, world!");
            fax.Unregister(mailManager);
        }
Esempio n. 3
0
 public void Unregister(MailManager mailManager)
 {
     mailManager.NewMail -= FaxMessage;
 }
Esempio n. 4
0
 public Fax(MailManager mailManager)
 {
     mailManager.NewMail += FaxMessage;
 }
Esempio n. 5
0
 public void Unregister(MailManager mailManager)
 {
     mailManager.NewMail -= FaxMessage;
 }
Esempio n. 6
0
 public Fax(MailManager mailManager)
 {
     mailManager.NewMail += FaxMessage;
 }