public static OpenCdnServiceResponse Unmarshall(UnmarshallerContext context) { OpenCdnServiceResponse openCdnServiceResponse = new OpenCdnServiceResponse(); openCdnServiceResponse.HttpResponse = context.HttpResponse; openCdnServiceResponse.RequestId = context.StringValue("OpenCdnService.RequestId"); return(openCdnServiceResponse); }
public static OpenCdnServiceResponse Unmarshall(UnmarshallerContext context) { OpenCdnServiceResponse openCdnServiceResponse = new OpenCdnServiceResponse(); openCdnServiceResponse.HttpResponse = context.HttpResponse; openCdnServiceResponse.RequestId = context.StringValue("OpenCdnService.RequestId"); return openCdnServiceResponse; }
/// <summary> /// 开通CDN服务 /// </summary> public void OpenCdnService() { OpenCdnServiceRequest request = new OpenCdnServiceRequest(); request.InternetChargeType = InternetChargeType.PayByTraffic.ToString(); try { OpenCdnServiceResponse response = client.Execute(request); if (string.IsNullOrEmpty(response.Code)) {//开通成功 } else { //开通失败 String errorCode = response.Code; //取得错误码 String message = response.Message; //取得错误信息 } } catch (Exception e) { // TODO: handle exception } }