Ejemplo n.º 1
0
        public void OnNewMail(NewMailEventArgs e)
        {
            EventHandler <NewMailEventArgs> temp = Volatile.Read(ref NewMail);

            if (temp != null)
            {
                temp(this, e);
            }
        }
Ejemplo n.º 2
0
        public void SimulateNewMail(string from, string to, string subject)
        {
            NewMailEventArgs e = new NewMailEventArgs(from, to, subject);

            OnNewMail(e);
        }
Ejemplo n.º 3
0
 protected void OnNewMail(NewMailEventArgs e)
 {
     Volatile.Read(ref NewMail)?.Invoke(this, e);
 }
Ejemplo n.º 4
0
 public void OnNewMail(object obj, NewMailEventArgs args)
 {
     Console.WriteLine(args.From);
     Console.WriteLine(args.To);
     Console.WriteLine(args.Subject);
 }