Files
BITFALL/Assets/BITKit/Core/AutoMapper/BITMapper.cs
CortexCore 922271e96d Revert "1"
This reverts commit 0b66b0a19e.
2025-01-20 23:39:36 +08:00

18 lines
456 B
C#

namespace BITKit
{
public static class BITMapper
{
public static void Map<T>(T source, T target) where T : class
{
foreach (var info in typeof(T).GetProperties())
{
info.SetValue(source, info.GetValue(target));
}
foreach (var info in typeof(T).GetFields())
{
info.SetValue(source, info.GetValue(target));
}
}
}
}