public void Send(string mobile, string content, SmsFormat type) { try { bool sendSms = true; if (_handler != null) { _log.InfoFormat("send a new message, content:{0}, target mobile:{1},SmsFromat:{2}", content, mobile, type); sendSms = _handler.OnSending(mobile, content, type); } if (sendSms) { ThreadPool.QueueUserWorkItem(state => ((SmsService)state).Send(mobile, content, type), _service); } } catch (Exception ex) { _log.Error("Send sms fail.", ex); } }