mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-19 01:58:14 +08:00
feat(tenpayv3): 优化反射性能
This commit is contained in:
@@ -36,8 +36,11 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Utilities
|
||||
Type propType = childProp.PropertyType;
|
||||
if (propType == typeof(string))
|
||||
{
|
||||
string oldValue = (string)childProp.GetValue(obj, null)!;
|
||||
var result = replacement(obj, childProp, oldValue);
|
||||
string value = (string)childProp.GetValue(obj, null)!;
|
||||
if (value is null)
|
||||
continue;
|
||||
|
||||
var result = replacement(obj, childProp, value);
|
||||
if (result.Modified)
|
||||
{
|
||||
childProp.SetValue(obj, result.NewValue);
|
||||
|
Reference in New Issue
Block a user