style: clean code

This commit is contained in:
Fu Diwei
2021-09-23 19:59:42 +08:00
parent b29fdf78c6
commit 143a5104a7
26 changed files with 55 additions and 118 deletions

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
{
/// <summary>
/// <para>表示 [GET] /credit_bills/get 接口的请求。</para>
@@ -42,6 +39,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public override string? Version { get; set; } = "v1.1";
public override string Version { get; set; } = "v1.1";
}
}

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
{
/// <summary>
/// <para>表示 [GET] /fund_statements_detailed/get 接口的请求。</para>
@@ -42,6 +39,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public override string? Version { get; set; } = "v1.1";
public override string Version { get; set; } = "v1.1";
}
}

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
{
/// <summary>
/// <para>表示 [GET] /funds/get 接口的请求。</para>
@@ -14,6 +11,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Ads.Models
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public override string? Version { get; set; } = "v1.1";
public override string Version { get; set; } = "v1.1";
}
}

View File

@@ -1,6 +1,4 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Ads
namespace SKIT.FlurlHttpClient.Wechat.Ads
{
/// <summary>
/// 一个用于构造 <see cref="WechatAdsClient"/> 时使用的配置项。
@@ -17,7 +15,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Ads
/// 获取或设置微信广告平台 API 域名。
/// <para>默认值:<see cref="WechatAdsEndpoints.DEFAULT"/></para>
/// </summary>
public string? Endpoints { get; set; } = WechatAdsEndpoints.DEFAULT;
public string Endpoints { get; set; } = WechatAdsEndpoints.DEFAULT;
/// <summary>
/// 获取或设置微信广告平台服务商 ID。

View File

@@ -1,6 +1,4 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Ads
namespace SKIT.FlurlHttpClient.Wechat.Ads
{
/// <summary>
/// 微信广告平台 API 请求的基类。
@@ -27,6 +25,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Ads
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public virtual string? Version { get; set; } = "v1.0";
public virtual string Version { get; set; } = "v1.0";
}
}

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.user_get_card 事件的数据。</para>
@@ -42,7 +39,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Events
[Newtonsoft.Json.JsonProperty("UnionId")]
[System.Text.Json.Serialization.JsonPropertyName("UnionId")]
[System.Xml.Serialization.XmlElement("UnionId", IsNullable = true)]
public string? UnionId { get; set; } = default!;
public string? UnionId { get; set; }
/// <summary>
/// 获取或设置是否来自好友转增。

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
@@ -894,7 +893,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("air_model")]
[System.Text.Json.Serialization.JsonPropertyName("air_model")]
public string? AirModel { get; set; } = string.Empty;
public string? AirModel { get; set; }
/// <summary>
/// 获取或设置起飞时间戳。

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /card/code/get 接口的响应。</para>
@@ -24,14 +21,14 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("code")]
[System.Text.Json.Serialization.JsonPropertyName("code")]
public string? CardCode { get; set; } = default!;
public string? CardCode { get; set; }
/// <summary>
/// 获取或设置卡券编号。
/// </summary>
[Newtonsoft.Json.JsonProperty("card_number")]
[System.Text.Json.Serialization.JsonPropertyName("card_number")]
public string? CardNumber { get; set; } = default!;
public string? CardNumber { get; set; }
/// <summary>
/// 获取或设置起用时间戳。

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /card/submerchant/batchget 接口的请求。</para>
@@ -10,10 +7,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// 获取或设置起始的子商户 ID。
/// <para>默认值0</para>
/// </summary>
[Newtonsoft.Json.JsonProperty("begin_id")]
[System.Text.Json.Serialization.JsonPropertyName("begin_id")]
public string? NextMerchantId { get; set; } = "0";
public string NextMerchantId { get; set; } = "0";
/// <summary>
/// 获取或设置分页每页数量。

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /nontax/getorder 接口的响应。</para>
@@ -98,7 +95,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("url")]
[System.Text.Json.Serialization.JsonPropertyName("url")]
public string? Url { get; set; } = default!;
public string? Url { get; set; }
/// <summary>
/// 获取或设置随机字符串。

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /nontax/notifyinconsistentorder 接口的请求。</para>
@@ -20,6 +17,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("order_id")]
[System.Text.Json.Serialization.JsonPropertyName("order_id")]
public string? OrderId { get; set; } = string.Empty;
public string? OrderId { get; set; }
}
}

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [GET] /sns/auth 接口的请求。</para>
@@ -13,7 +10,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public override string? AccessToken { get; set; } = string.Empty;
public override string? AccessToken { get; set; }
/// <summary>
/// 获取或设置用户唯一标识。

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [GET] /sns/userinfo 接口的请求。</para>
@@ -13,7 +10,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public override string? AccessToken { get; set; } = string.Empty;
public override string? AccessToken { get; set; }
/// <summary>
/// 获取或设置用户唯一标识。

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /union/promoter/product/generate 接口的响应。</para>
@@ -118,7 +115,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("promotionUrl")]
[System.Text.Json.Serialization.JsonPropertyName("promotionUrl")]
public string? PromotionUrl { get; set; } = default!;
public string? PromotionUrl { get; set; }
/// <summary>
/// 获取或设置推广商品带券文案。
@@ -132,7 +129,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("couponPromotionUrl")]
[System.Text.Json.Serialization.JsonPropertyName("couponPromotionUrl")]
public string? PromotionWithCouponUrl { get; set; } = default!;
public string? PromotionWithCouponUrl { get; set; }
}
}

View File

@@ -1,6 +1,4 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Api
namespace SKIT.FlurlHttpClient.Wechat.Api
{
/// <summary>
/// 一个用于构造 <see cref="WechatApiClient"/> 时使用的配置项。
@@ -17,7 +15,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
/// 获取或设置微信 API 域名。
/// <para>默认值:<see cref="WechatApiEndpoints.DEFAULT"/></para>
/// </summary>
public string? Endpoints { get; set; } = WechatApiEndpoints.DEFAULT;
public string Endpoints { get; set; } = WechatApiEndpoints.DEFAULT;
/// <summary>
/// 获取或设置微信 AppId。

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
@@ -52,7 +51,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("business_time")]
[System.Text.Json.Serialization.JsonPropertyName("business_time")]
public string? LicenseValidDate { get; set; } = string.Empty;
public string? LicenseValidDate { get; set; }
}
public class OrganizationCertificate

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [GET] /profitsharing/return-orders 接口的请求。</para>
@@ -13,7 +10,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? SubMerchantId { get; set; } = string.Empty;
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置商户分账单号。

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
{
/// <summary>
/// <para>表示 [POST] /profitsharing/receivers/add 接口的请求。</para>
@@ -13,7 +10,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("sub_mchid")]
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
public string? SubMerchantId { get; set; } = string.Empty;
public string? SubMerchantId { get; set; }
/// <summary>
/// 获取或设置微信 AppId。

View File

@@ -18,7 +18,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
/// 获取或设置微信支付 API 域名。
/// <para>默认值:<see cref="WechatTenpayEndpoints.DEFAULT"/></para>
/// </summary>
public string? Endpoints { get; set; } = WechatTenpayEndpoints.DEFAULT;
public string Endpoints { get; set; } = WechatTenpayEndpoints.DEFAULT;
/// <summary>
/// 获取或设置声明应答中的错误描述使用的自然语言语种。

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
@@ -13,7 +12,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public override string? AccessToken { get; set; } = string.Empty;
public override string? AccessToken { get; set; }
/// <summary>
/// 获取或设置应用 ID。如果不指定将使用构造 <see cref="WechatWorkClient"/> 时的 <see cref="WechatWorkClientOptions.AgentId"/> 参数。

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/externalcontact/group_welcome_template/del 接口的请求。</para>
@@ -13,7 +10,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("template_id")]
[System.Text.Json.Serialization.JsonPropertyName("template_id")]
public string? TemplateId { get; set; } = string.Empty;
public string TemplateId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置授权方安装的应用 ID。

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/externalcontact/get_moment_comments 接口的响应。</para>
@@ -24,7 +21,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("external_userid")]
[System.Text.Json.Serialization.JsonPropertyName("external_userid")]
public string? ExternalUserId { get; set; } = default!;
public string? ExternalUserId { get; set; }
/// <summary>
/// 获取或设置互动时间戳。

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/meeting/get_user_meetingid 接口的请求。</para>
@@ -31,10 +28,11 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// <summary>
/// 获取或设置翻页标记。
/// <para>默认值0</para>
/// </summary>
[Newtonsoft.Json.JsonProperty("cursor")]
[System.Text.Json.Serialization.JsonPropertyName("cursor")]
public string? NextCursor { get; set; } = "0";
public string NextCursor { get; set; } = "0";
/// <summary>
/// 获取或设置分页每页数量。

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [GET] /cgi-bin/sync/contact_sync_success 接口的请求。</para>
@@ -13,6 +10,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public override string? AccessToken { get; set; } = string.Empty;
public override string? AccessToken { get; set; }
}
}

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/wedrive/file_download 接口的响应。</para>
@@ -27,6 +24,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
/// </summary>
[Newtonsoft.Json.JsonProperty("cookie_value")]
[System.Text.Json.Serialization.JsonPropertyName("cookie_value")]
public string? CookieValue { get; set; } = default!;
public string? CookieValue { get; set; }
}
}

View File

@@ -1,6 +1,4 @@
using System;
namespace SKIT.FlurlHttpClient.Wechat.Work
namespace SKIT.FlurlHttpClient.Wechat.Work
{
/// <summary>
/// 一个用于构造 <see cref="WechatWorkClient"/> 时使用的配置项。
@@ -17,7 +15,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
/// 获取或设置企业微信 API 域名。
/// <para>默认值:<see cref="WechatWorkEndpoints.DEFAULT"/></para>
/// </summary>
public string? Endpoints { get; set; } = WechatWorkEndpoints.DEFAULT;
public string Endpoints { get; set; } = WechatWorkEndpoints.DEFAULT;
/// <summary>
/// 获取或设置企业微信 CorpId。