示例#1
0
        public void OnNewMail(NewMailEventArgs e)
        {
            EventHandler <NewMailEventArgs> temp = Volatile.Read(ref NewMail);

            if (temp != null)
            {
                temp(this, e);
            }
        }
示例#2
0
        public void SimulateNewMail(string from, string to, string subject)
        {
            NewMailEventArgs e = new NewMailEventArgs(from, to, subject);

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