1
This commit is contained in:
@@ -8,12 +8,20 @@
|
||||
{
|
||||
if (info.CanWrite is false) continue;
|
||||
var targetInfo = target.GetType().GetProperty(info.Name, ReflectionHelper.Flags);
|
||||
targetInfo?.SetValue(target, info.GetValue(source));
|
||||
var value = info.GetValue(source);
|
||||
if (value is not null)
|
||||
{
|
||||
targetInfo?.SetValue(target,value );
|
||||
}
|
||||
}
|
||||
foreach (var info in source.GetType().GetFields(ReflectionHelper.Flags))
|
||||
{
|
||||
var targetInfo = target.GetType().GetField(info.Name, ReflectionHelper.Flags);
|
||||
targetInfo?.SetValue(target, info.GetValue(source));
|
||||
var value = info.GetValue(source);
|
||||
if (value is not null)
|
||||
{
|
||||
targetInfo?.SetValue(target, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user