コード例 #1
0
        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");
            }
        }
コード例 #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");
            }
        }