Files
iFactory.Cutting.Unity/Assets/BITKit/Core/AutoMapper/BITMapper.cs
CortexCore fd39099061 init
2024-01-23 02:56:26 +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));
}
}
}
}