mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-18 13:26:42 +08:00
style(tenpayv2): clean code
This commit is contained in:
parent
d839ee8f94
commit
e69b86a60e
@ -30,7 +30,7 @@ namespace Newtonsoft.Json.Converters
|
|||||||
else if (reader.TokenType == JsonToken.String)
|
else if (reader.TokenType == JsonToken.String)
|
||||||
{
|
{
|
||||||
string? value = serializer.Deserialize<string>(reader);
|
string? value = serializer.Deserialize<string>(reader);
|
||||||
if (value == null)
|
if (string.IsNullOrEmpty(value))
|
||||||
return existingValue;
|
return existingValue;
|
||||||
|
|
||||||
if (CHAR_YES.Equals(value))
|
if (CHAR_YES.Equals(value))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Newtonsoft.Json.Converters
|
namespace Newtonsoft.Json.Converters
|
||||||
@ -26,7 +26,7 @@ namespace Newtonsoft.Json.Converters
|
|||||||
else if (reader.TokenType == JsonToken.String)
|
else if (reader.TokenType == JsonToken.String)
|
||||||
{
|
{
|
||||||
string? value = serializer.Deserialize<string>(reader);
|
string? value = serializer.Deserialize<string>(reader);
|
||||||
if (value == null)
|
if (string.IsNullOrEmpty(value))
|
||||||
return existingValue;
|
return existingValue;
|
||||||
|
|
||||||
if (DateTimeOffset.TryParseExact(value, DATETIME_FORMAT, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out DateTimeOffset result))
|
if (DateTimeOffset.TryParseExact(value, DATETIME_FORMAT, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out DateTimeOffset result))
|
||||||
|
@ -24,7 +24,7 @@ namespace System.Text.Json.Converters
|
|||||||
else if (reader.TokenType == JsonTokenType.String)
|
else if (reader.TokenType == JsonTokenType.String)
|
||||||
{
|
{
|
||||||
string? value = reader.GetString();
|
string? value = reader.GetString();
|
||||||
if (value == null)
|
if (string.IsNullOrEmpty(value))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (CHAR_YES.Equals(value))
|
if (CHAR_YES.Equals(value))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace System.Text.Json.Converters
|
namespace System.Text.Json.Converters
|
||||||
@ -16,7 +16,7 @@ namespace System.Text.Json.Converters
|
|||||||
else if (reader.TokenType == JsonTokenType.String)
|
else if (reader.TokenType == JsonTokenType.String)
|
||||||
{
|
{
|
||||||
string? value = reader.GetString();
|
string? value = reader.GetString();
|
||||||
if (value == null)
|
if (string.IsNullOrEmpty(value))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (DateTimeOffset.TryParseExact(value, DATETIME_FORMAT, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out DateTimeOffset result))
|
if (DateTimeOffset.TryParseExact(value, DATETIME_FORMAT, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out DateTimeOffset result))
|
||||||
|
Loading…
Reference in New Issue
Block a user