示例#1
0
 void TimerElapsed(object sender, ElapsedEventArgs e)
 {
     try
     {
         DoInvoke();
     }
     catch (Exception ex)
     {
         DefaultEmailSender.Send(string.Format("Error in {0}", this.GetType().Name), ex.ToString());
     }
 }
示例#2
0
        public override void DoInvoke()
        {
            try
            {
                const string subject = "Echo search failed";
                const string body    = "Call to echo SearchSupporterGroup method failed - the echo service appears to be down";

                if (!SearchSuccessful())
                {
                    //search again
                    if (!SearchSuccessful())
                    {
                        SmsSender.Send(subject, body);
                        EmailSender.Send(subject, body);
                    }
                }
            }
            catch (Exception ex)
            {
                _defaultEmailSender.Send("Echo search failed", string.Format("Call to echo SearchSupporterGroup method failed: {0}", ex));
            }
        }
示例#3
0
 public void Execute()
 {
     _defaultEmailSender.Send("mailer startup", "mailer startup plugin executed");
 }