public AliyunSmsSender(IOptions <AliyunSmsOptions> aliyunOptions, ISmsLimit smsLimit, IOptionsMonitor <SmsOptions> sOptions) : base(smsLimit, sOptions) { AliyunOptions = aliyunOptions; Client = new AliyunClient(new AliyunConfig { AccessKeyId = AliyunOptions.Value.AppId, AccessKeySecret = AliyunOptions.Value.AppKey, Endpoint = AliyunOptions.Value.EndPoint }); }
public SmsHelper(SmsHelperOptions options) { _options = options; var config = new AlibabaCloud.OpenApiClient.Models.Config { AccessKeyId = _options.AccessKeyId, AccessKeySecret = _options.AccessKeySecret, Endpoint = _options.Endpoint }; _client = new AlibabaCloud.SDK.Dysmsapi20170525.Client(config); }