public SmsController(IConfiguration configuration, IOptions <SmsSettingReader> app) { _configuration = configuration; otp = new OtpAndSms(); _msgFactory = new MsgFactory(); appSettings = app; }
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); }