コード例 #1
0
ファイル: SmsController.cs プロジェクト: atul2210/shopLatest
 public SmsController(IConfiguration configuration, IOptions <SmsSettingReader> app)
 {
     _configuration = configuration;
     otp            = new OtpAndSms();
     _msgFactory    = new MsgFactory();
     appSettings    = app;
 }
コード例 #2
0
ファイル: MsgFactory.cs プロジェクト: atul2210/shopLatest
        public Task <int> SendOtp(int msgType, string mobile, OtpAndSms smsUrl)
        {
            IsmsNotification <string, OtpAndSms> factory = null;
            Task <int> otp = null;

            // if(msgType.Equals(MessageTypeEnum.otp))

            switch (msgType)
            {
            case 1:     //MessageTypeEnum.otp:
            {
                factory = new Otpsender();
                otp     = factory.SendOtp(mobile, smsUrl);
                break;
            }
            }
            return(otp);
        }