我需要使用具有不同类型的发射映射器。对于默认值,它需要两种通用类型:
ObjectMapperManager.DefaultInstance.GetMapper<TSource, TEntity>().Map(source, result);
我需要做这样的事情:
class Result { public string Name { set; get;} public int Age {set; get;} }
...
Result result;
object someType = new SomeTypes { Name = "TestName", Age = 23 }
ObjectMapperManager.DefaultInstance.GetMapper<object, Result >().Map(source, result);
Console.WriteLine(result.Name);