コード例 #1
0
ファイル: SmsScheduler.cs プロジェクト: realimbaf/smsReader
 public SmsScheduler()
 {
     _composite         = new SmsComposite();
     _modemSmsHandler   = new HandlerModemMessages();
     _paymentSmsHandler = new HandlerPaymentSms();
     _queueSmsHandler   = new HandlerQueueMessages();
 }
コード例 #2
0
 public DeliveryBoyController(IUnitOfWork unit, IOptions <AppSettings> appSettings, UserManager <ApplicationUser> userManager, ISmsHandler <SmsResponseModel> sms)
 {
     _unit        = unit;
     _appSettings = appSettings.Value;
     _userManager = userManager;
     _sms         = sms;
 }
コード例 #3
0
 public AuthenticateController(IOptions <AppSettings> appSettings, IUnitOfWork unit, UserManager <ApplicationUser> userManager, ISmsHandler <SmsResponseModel> smsHandler)
 {
     _unit        = unit;
     _appSettings = appSettings.Value;
     _userManager = userManager;
     _smsHandler  = smsHandler;
 }
コード例 #4
0
 public MemberSMSValiCodeTaskAPIController(ICommunityService communityService
                                           , MemberDbContext memberDb
                                           , ISmsHandler smsHandler
                                           , IOptions <MemberAPIOptions> options
                                           , IOptions <SmsOptions> smsOptions
                                           , ILoggerFactory loggerFactory)
     : base(communityService, options, memberDb)
 {
     this.smsHandler = smsHandler;
     this.smsOptions = smsOptions.Value;
     _logger         = loggerFactory.CreateLogger <MemberAPIController>();
 }
コード例 #5
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="wechatOptions"></param>
 /// <param name="smsOptions"></param>
 /// <param name="smsHandler"></param>
 /// <param name="wechatCoreDb"></param>
 /// <param name="communityService"></param>
 /// <param name="memberOptions"></param>
 /// <param name="memberDb"></param>
 /// <param name="loggerFactory"></param>
 public WechatAPIController(
     IOptions <WechatOptions> wechatOptions,
     IOptions <SmsOptions> smsOptions,
     ISmsHandler smsHandler,
     WechatCoreDbContext wechatCoreDb,
     ICommunityService communityService,
     IOptions <MemberAPIOptions> memberOptions,
     MemberDbContext memberDb,
     ILoggerFactory loggerFactory)
     : base(memberOptions, memberDb, wechatCoreDb)
 {
     this.smsHandler    = smsHandler;
     this.smsOptions    = smsOptions.Value;
     this.wechatOptions = wechatOptions.Value;
     _logger            = loggerFactory.CreateLogger <WechatAPIController>();
 }
コード例 #6
0
ファイル: SmsPrivoder.cs プロジェクト: luqizheng/Qi4Net
 public SmsProvider()
 {
     try
     {
         var com = new ComConnection(Configuration.PortName, Configuration.BaudRate);
         _handler = Configuration.SmsHandler;
         if (_handler != null)
             _handler.Priovider = this;
         _service = new SmsService(com);
         _service.ReceiveSmsEvent += ServiceNewSmsEvent;
         _log = LogManager.GetLogger(GetType());
         _service.SetSmsAutoRecieve();
     }
     catch (Exception ex)
     {
         _log.Error("Ini error.", ex);
     }
 }
コード例 #7
0
 public SmsProvider()
 {
     try
     {
         var com = new ComConnection(Configuration.PortName, Configuration.BaudRate);
         _handler = Configuration.SmsHandler;
         if (_handler != null)
         {
             _handler.Priovider = this;
         }
         _service = new SmsService(com);
         _service.ReceiveSmsEvent += ServiceNewSmsEvent;
         _log = LogManager.GetLogger(GetType());
         _service.SetSmsAutoRecieve();
     }
     catch (Exception ex)
     {
         _log.Error("Ini error.", ex);
     }
 }
コード例 #8
0
 public SmsController(ISmsHandler messageHandler) : base(messageHandler)
 {
     _messageHandler = messageHandler;
 }
コード例 #9
0
 public ChainSmsHandler(ISmsHandler current, IChainSmsHandler successor, IChainSmsHandler fallback)
 {
     _successor = successor;
     _current   = current;
     _fallback  = fallback;
 }