feat: 重命名配置项参数 "Endpoints" → "Endpoint"

This commit is contained in:
Fu Diwei
2023-03-12 08:05:24 +08:00
parent c2723bba7a
commit f187a420db
24 changed files with 64 additions and 60 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
@@ -11,6 +11,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
/// <summary>
/// <para>异步调用 [POST] /risk/getpublickey 接口。</para>
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay_yhk.php?chapter=24_7&index=4 </para>
/// <para><i>(请注意此接口不受构造 <see cref="WechatTenpayClient" /> 时指定的 <see cref="WechatTenpayClientOptions.Endpoint"/> 参数控制。)</i></para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>

View File

@@ -28,7 +28,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
Credentials = new Settings.Credentials(options);
FlurlClient.BaseUrl = options.Endpoints ?? WechatTenpayEndpoints.DEFAULT;
FlurlClient.BaseUrl = options.Endpoint ?? WechatTenpayEndpoints.DEFAULT;
FlurlClient.WithTimeout(TimeSpan.FromMilliseconds(options.Timeout));
FlurlClient.Configure((settings) =>
settings.HttpClientFactory = new Settings.HttpClientFactory(

View File

@@ -12,10 +12,10 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV2
public int Timeout { get; set; } = 30 * 1000;
/// <summary>
/// 获取或设置微信支付 API 域名
/// 获取或设置微信支付 API 入口点
/// <para>默认值:<see cref="WechatTenpayEndpoints.DEFAULT"/></para>
/// </summary>
public string Endpoints { get; set; } = WechatTenpayEndpoints.DEFAULT;
public string Endpoint { get; set; } = WechatTenpayEndpoints.DEFAULT;
/// <summary>
/// 获取或设置微信商户号。