コード例 #1
0
        public void SimulateNewMail(string from, string to, string subject)
        {
            var e = new NewMailEventArgs(from, to, subject);

            Task.Run(() => OnNewMail(e));
        }
コード例 #2
0
        public void FaxMsg(object sender, NewMailEventArgs e)
        {
            //if (m_id == 2) throw new Exception("just say something");

            Console.WriteLine($"{m_id}_{e.From}_{e.To}_{e.Subject}");
        }
コード例 #3
0
        //public event EventHandler Mail;

        protected virtual void OnNewMail(NewMailEventArgs e)
        {
            Volatile.Read(ref NewMail)?.Invoke(this, e);
        }