public static void Main(string[] args) { MailMngr mm = new MailMngr(); Fax fax = new Fax(mm); Pager pager = new Pager(mm); mm.SimulateArrivingMsg( "*****@*****.**", "*****@*****.**", "Inappropriate workplace behaviour", "Hey Dana, Jeff said you flashed him again. As your supervisor I find it highly inappropriate that you flash him before you flash me." ); }
/// <summary> /// Initializes a new instance of the <see cref="T:MailManager.Fax"/> class. /// </summary> /// <param name="mm">Mm.</param> public Fax(MailMngr mm) { mm.MailMsg += FaxMsg; }
public void Unregister(MailMngr mm) { mm.MailMsg -= FaxMsg; }
public Pager(MailMngr mm) { mm.MailMsg += PageMsg; }
public void Unregister(MailMngr mm) { mm.MailMsg -= PageMsg; }