Ejemplo n.º 1
0
 public Delegate Create()
 {
     if (TypeRouter(typeof(TSrc)))
     {
         //创建委托
         _handler.ComplierOption.UseFileComplie();
         return(_handler
                .ClassName($"NMapperSingleConvert{AvailableNameReverser.GetName(typeof(TSrc))}To{AvailableNameReverser.GetName(typeof(TDest))}")
                .MethodName("Mapper")
                .Param <TSrc>(SRC)
                .MethodBody(_script.ToString())
                .Return <TDest>()
                .Complie());
     }
     return(null);
 }