/// <summary> /// 删除短信签名。 /// </summary> /// <param name="input"></param> /// <returns></returns> public Task <SmsResult> DeleteSmsSignAsync(DeleteSmsSignInput input) { var client = new AliyunSmsClient(); var acsClient = client.AcsClient; var request = new DeleteSmsSignRequest(); var result = new SmsResult(); try { request.SignName = input.SignName; //请求失败这里会抛ClientException异常 var DeleteSmsSignResponse = acsClient.GetAcsResponse(request); //发送成功判断 if ("OK".Equals(DeleteSmsSignResponse.Code, StringComparison.CurrentCultureIgnoreCase)) { result.Success = true; } else { result.Success = false; result.ErrorMessage = DeleteSmsSignResponse.Message; } } catch (ClientException e) { AliyunSmsHelper.LoggerAction("Error", e.ToString()); result.Success = false; result.ErrorMessage = e.ErrorMessage; } catch (Exception e) { AliyunSmsHelper.LoggerAction("Error", e.ToString()); result.Success = false; result.ErrorMessage = e.Message; } return(Task.FromResult(result)); }
/// <summary> /// 删除短信签名。 /// </summary> /// <param name="input"></param> /// <returns></returns> public async Task <SmsResult> DeleteSmsSignAsync(DeleteSmsSignInput input) { return(await SmsService.DeleteSmsSignAsync(input)); }