feat(wxapi): 调整部分文档注释

This commit is contained in:
Fu Diwei 2021-06-07 00:31:43 +08:00
parent 737095305f
commit 2e294b0ce7
21 changed files with 24 additions and 24 deletions

View File

@ -7,7 +7,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
/// <para>表示 EVENT.unsubscribe 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html#%E5%85%B3%E6%B3%A8-%E5%8F%96%E6%B6%88%E5%85%B3%E6%B3%A8%E4%BA%8B%E4%BB%B6 </para>
/// </summary>
public class UnsubscribePushEvent : WechatApiEvent, WechatApiEvent.Types.IXmlSerializable
public class UnsubscribePushEvent : SubscribePushEvent, WechatApiEvent.Types.IXmlSerializable
{
}
}

View File

@ -25,7 +25,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
if (string.IsNullOrEmpty(request.DeliverySignature))
{
string plainText = $"{request.ShopId}{request.ShopOrderId}{client.ImmeDeliveryAppSecret}";
request.DeliverySignature = Utilities.Sha1Util.Hash(plainText).ToLower();
request.DeliverySignature = Security.SHA1Utility.Hash(plainText).ToLower();
}
return request;

View File

@ -47,7 +47,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
+ $"&org_loc={reqLoc}"
+ $"&method={method.ToUpper()}"
+ $"&secret={client.MidasAppKey}";
request.Signature = Utilities.HmacSha256Util.Hash(client.MidasAppKey ?? string.Empty, plainText).ToLower();
request.Signature = Security.HMACSHA256Utility.Hash(client.MidasAppKey ?? string.Empty, plainText).ToLower();
}
return request;

View File

@ -18,7 +18,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
public static class WechatApiClientParameterExtensions
{
/// <summary>
/// <para>生成客户端 JS-SDK 初始化所需的参数。</para>
/// <para>生成客户端 JS-SDK `wx.config` 所需的参数。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html#62 </para>
/// </summary>
/// <param name="client"></param>
@ -33,7 +33,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
string timestamp = DateTimeOffset.Now.ToLocalTime().ToUnixTimeSeconds().ToString();
string nonce = Guid.NewGuid().ToString("N");
string sign = Utilities.Sha1Util.Hash($"jsapi_ticket={jsapiTicket}&noncestr={nonce}&timestamp={timestamp}&url={url.Split('#')[0]}").ToLower();
string sign = Security.SHA1Utility.Hash($"jsapi_ticket={jsapiTicket}&noncestr={nonce}&timestamp={timestamp}&url={url.Split('#')[0]}").ToLower();
return new ReadOnlyDictionary<string, string>(new Dictionary<string, string>()
{
@ -66,7 +66,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
sortedParams.Add(client.AppId);
sortedParams.Add(nonce);
sortedParams.Add(wxcardTicket);
string cardSign = Utilities.Sha1Util.Hash(string.Join(string.Empty, sortedParams)).ToLower();
string cardSign = Security.SHA1Utility.Hash(string.Join(string.Empty, sortedParams)).ToLower();
return new ReadOnlyDictionary<string, string>(new Dictionary<string, string>()
{

View File

@ -87,7 +87,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
}
/// <summary>
/// 获取或设置二维码有效时间(单位:秒)。
/// 获取或设置二维码有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expire_seconds")]
[System.Text.Json.Serialization.JsonPropertyName("expire_seconds")]

View File

@ -9,7 +9,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public class CardQrcodeCreateResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置二维码有效时间(单位:秒)。
/// 获取或设置二维码有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expire_seconds")]
[System.Text.Json.Serialization.JsonPropertyName("expire_seconds")]

View File

@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public string PdfUrl { get; set; } = default!;
/// <summary>
/// 获取或设置发票文件 URL 有效时间(单位:秒)。
/// 获取或设置发票文件 URL 有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("pdf_url_expire_time")]
[System.Text.Json.Serialization.JsonPropertyName("pdf_url_expire_time")]

View File

@ -9,14 +9,14 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public class CgibinTicketGetTicketResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置 ApiTicket即卡券接口中签名所需凭证
/// 获取或设置票据
/// </summary>
[Newtonsoft.Json.JsonProperty("ticket")]
[System.Text.Json.Serialization.JsonPropertyName("ticket")]
public string Ticket { get; set; } = default!;
/// <summary>
/// 获取或设置凭证有效时间(单位:秒)。
/// 获取或设置票据有效期(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expires_in")]
[System.Text.Json.Serialization.JsonPropertyName("expires_in")]

View File

@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public string AccessToken { get; set; } = default!;
/// <summary>
/// 获取或设置凭证有效时间(单位:秒)。
/// 获取或设置凭证有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expires_in")]
[System.Text.Json.Serialization.JsonPropertyName("expires_in")]

View File

@ -23,7 +23,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public string? AuthorizerRefreshToken { get; set; }
/// <summary>
/// 获取或设置授权方 AccessToken 有效时间(单位:秒)。
/// 获取或设置授权方 AccessToken 有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expires_in")]
[System.Text.Json.Serialization.JsonPropertyName("expires_in")]

View File

@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public string ComponentAccessToken { get; set; } = default!;
/// <summary>
/// 获取或设置第三方平台 AccessToken 有效时间(单位:秒)。
/// 获取或设置第三方平台 AccessToken 有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expires_in")]
[System.Text.Json.Serialization.JsonPropertyName("expires_in")]

View File

@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public string PreAuthCode { get; set; } = default!;
/// <summary>
/// 获取或设置预授权码有效时间(单位:秒)。
/// 获取或设置预授权码有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expires_in")]
[System.Text.Json.Serialization.JsonPropertyName("expires_in")]

View File

@ -60,7 +60,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public string? AuthorizerRefreshToken { get; set; }
/// <summary>
/// 获取或设置授权方 AccessToken 有效时间(单位:秒)。
/// 获取或设置授权方 AccessToken 有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expires_in")]
[System.Text.Json.Serialization.JsonPropertyName("expires_in")]

View File

@ -42,7 +42,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
}
/// <summary>
/// 获取或设置二维码有效时间(单位:秒)。
/// 获取或设置二维码有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expire_seconds")]
[System.Text.Json.Serialization.JsonPropertyName("expire_seconds")]

View File

@ -9,7 +9,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public class CgibinQrcodeCreateResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置二维码有效时间(单位:秒)。
/// 获取或设置二维码有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expire_seconds")]
[System.Text.Json.Serialization.JsonPropertyName("expire_seconds")]

View File

@ -9,7 +9,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public class CgibinShortenFetchResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置二维码类型有效时间(单位:秒)。
/// 获取或设置二维码类型有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expire_seconds")]
[System.Text.Json.Serialization.JsonPropertyName("expire_seconds")]

View File

@ -9,7 +9,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public class CgibinShortenGenerateRequest : WechatApiRequest
{
/// <summary>
/// 获取或设置有效时间(单位:秒)。
/// 获取或设置有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expire_seconds")]
[System.Text.Json.Serialization.JsonPropertyName("expire_seconds")]

View File

@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public string AuthUrl { get; set; } = default!;
/// <summary>
/// 获取或设置授权链接有效时间(单位:秒)。
/// 获取或设置授权链接有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expires_in")]
[System.Text.Json.Serialization.JsonPropertyName("expires_in")]

View File

@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public string AuthUrl { get; set; } = default!;
/// <summary>
/// 获取或设置授权链接有效时间(单位:秒)。
/// 获取或设置授权链接有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expire_time")]
[System.Text.Json.Serialization.JsonPropertyName("expire_time")]

View File

@ -16,7 +16,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
public string AccessToken { get; set; } = default!;
/// <summary>
/// 获取或设置凭证有效时间(单位:秒)。
/// 获取或设置凭证有效(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("expires_in")]
[System.Text.Json.Serialization.JsonPropertyName("expires_in")]

View File

@ -55,7 +55,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
public string? Event { get; set; }
/// <summary>
/// 获取或设置消息创建时间
/// 获取或设置消息创建时间
/// </summary>
[Newtonsoft.Json.JsonProperty("CreateTime")]
[System.Text.Json.Serialization.JsonPropertyName("CreateTime")]