style: clean code

This commit is contained in:
Fu Diwei
2021-08-05 18:32:40 +08:00
parent 394232ee41
commit 5470783813
3 changed files with 1 additions and 11 deletions

View File

@@ -96,9 +96,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
.SetQueryParam("access_token", request.AccessToken)
.SetQueryParam("external_userid", request.ExternalUserId);
if (!string.IsNullOrEmpty(request.NextCursor))
request.NextCursor = request.NextCursor;
return await client.SendRequestWithJsonAsync<Models.CgibinExternalContactGetResponse>(flurlReq, cancellationToken: cancellationToken);
}

View File

@@ -14,12 +14,5 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string ExternalUserId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置翻页标记。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? NextCursor { get; set; }
}
}

View File

@@ -221,7 +221,7 @@ namespace SKIT.FlurlHttpClient.Wechat
{
using StringReader reader = new StringReader(xml);
XmlSerializer xmlSerializer = new XmlSerializer(type, new XmlRootAttribute("xml"));
var obj = xmlSerializer.Deserialize(reader);
xmlSerializer.Deserialize(reader);
}
catch (Exception ex)
{