Ejemplo n.º 1
0
        public void Send(ISMSEntity entity)
        {
            var sender = new SmsSingleSender(Constants.SMS_AppId, Constants.SMS_AppKey);

            sender.send(0, "86", entity.Mobile, entity.GetBody(), string.Empty, string.Empty);
        }
Ejemplo n.º 2
0
 public bool Equals(ISMSEntity other)
 {
     //如果同一手机号码在5分钟以内 则认为这两条 短信是相同的,相同的短信不允许重发
     return(this.Mobile.Equals(other.Mobile) &&
            Math.Abs(this.CreatedTime - other.CreatedTime) < 60 * 5);
 }