public ISmsService Create(SmsEnums.SmsType type)
        {
            switch (type)
            {
            case SmsEnums.SmsType.Aliyun: return(_aliyunSmsService);

            case SmsEnums.SmsType.Tencent: return(_tencentSmsService);

            default: throw new ResillienceException("无法识别的type");
            }
        }
Exemplo n.º 2
0
        public BaseSMS Create(SmsEnums.SmsType type)
        {
            switch (type)
            {
            case SmsEnums.SmsType.JisnZhou: return(_jianZhouSms);

            case SmsEnums.SmsType.WoDong: return(_woDongSms);

            case SmsEnums.SmsType.EXunTong: return(_eXunTongSms);

            default: throw new SmsException("无法识别的type");
            }
        }