private void FaxMsg(object sender, NewMailEventArgs e) { Console.WriteLine("Sending mail to Post office:"); Console.WriteLine($" From={e.From}, To={e.To}, Subject={e.Subject}"); }
public void SimulateNewMail(string from, string to, string subject) { NewMailEventArgs e = new NewMailEventArgs(from, to, subject); OnNewMail(e); }
private void FaxMsg(object sender, NewMailEventArgs e) { Console.WriteLine("Faxing mail message:"); Console.WriteLine($" From={e.From}, To={e.To}, Subject={e.Subject}"); }
protected virtual void OnNewMail(NewMailEventArgs e) { Volatile.Read(ref NewMail)?.Invoke(this, e); }