U:调整所有代码格式
This commit is contained in:
1 parent
d133bacf55
commit
155b67e831
342 files changed
+9431
-9868
No files matched your search
@@ -332,17 +332,13 @@ public static class ReflectionHelper
|
||||
);
|
||||
|
||||
foreach (var sourceProp in sourceProperties)
|
||||
{
|
||||
if (targetProperties.TryGetValue(sourceProp.Name, out var targetProp))
|
||||
{
|
||||
// 检查类型是否兼容
|
||||
if (targetProp.PropertyType.IsAssignableFrom(sourceProp.PropertyType))
|
||||
{
|
||||
var value = sourceProp.GetValue(source);
|
||||
targetProp.SetValue(target, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -522,4 +518,4 @@ public static class ReflectionHelper
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user