aliyun / aliyun-openapi-net-sdk

Alibaba Cloud SDK for .NET
https://www.nuget.org/profiles/aliyun-openapi-sdk
Other
541 stars 625 forks source link

change: endpoints rule upgrade #279

Closed AxiosLeo closed 5 years ago

AxiosLeo commented 5 years ago

info: 增加 AcsRequestTest.GetEndpoint() 单元测试。 增加 AcsRequest.GetProductEndpoint()方法,支持新的 endpoints 数据规则的使用。 增加 AcsRequest.SetEndpoint() 方法,用户可使用此方法指定 Endpoint 原理: 增加 AcsRequest.GetProductEndpoint()方法,根据新的 endpoints 规则数据进行 endpoint 寻址。 增加 AcsRequest.SetProductDomain()方法,进行 AcsRequest.ProductDomain 属性的初始化。 增加 AcsRequest.SetEndpoint() 方法,直接对 AcsRequest.ProductDomain 属性进行赋值。

若 AcsRequest.ProductDomain 初始化成功,则 ProductDomain 属性不为 null,初始化不成功,则 ProductDomain 属性为 null。

DefaultAcsClient 中判断 request 的 ProductDomain 不为 null 时,直接使用 ProductDomain 中的 DomainName 作为 endpoint。

codecov-io commented 5 years ago

Codecov Report

Merging #279 into master will increase coverage by 0.11%. The diff coverage is 96.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #279      +/-   ##
==========================================
+ Coverage   95.06%   95.17%   +0.11%     
==========================================
  Files          64       64              
  Lines        3321     3381      +60     
  Branches      332      342      +10     
==========================================
+ Hits         3157     3218      +61     
+ Misses        111      109       -2     
- Partials       53       54       +1
Flag Coverage Δ
#unittest 95.17% <96.96%> (+0.11%) :arrow_up:
Impacted Files Coverage Δ
aliyun-net-sdk-core/AcsRequest.cs 100% <100%> (ø) :arrow_up:
aliyun-net-sdk-core/DefaultAcsClient.cs 90.05% <86.66%> (-0.33%) :arrow_down:
aliyun-net-sdk-core/Http/HttpResponse.cs 96.35% <0%> (+2.18%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 30a81ee...fc5d92b. Read the comment docs.