Exemple #1
0
        protected virtual void OnNewMail(NewMailEventArgs e)
        {
            EventHandler <NewMailEventArgs> temp = Volatile.Read(ref NewMail);

            if (temp != null)
            {
                temp(this, e);
            }

            //e.Raise(this, ref m_NewMail);
        }
Exemple #2
0
        public void SimulateNewMail(String from, String to, String subject)
        {
            NewMailEventArgs e = new NewMailEventArgs(from, to, subject);

            OnNewMail(e);
        }
Exemple #3
0
 private void FaxMsg(Object sender, NewMailEventArgs e)
 {
     Console.WriteLine("Faxing mail message:");
     Console.WriteLine($"From{e.From}, To {e.To}, Subject {e.Subject}");
 }