Exemplo n.º 1
0
        public void Intercept(IInvocation invocation)
        {
            if (_classType == null)
            {
                _classType = TypeMapper.CreateObject(_item, _targetType, false);
            }

            invocation.ReturnValue = invocation.Method.Invoke(_classType, invocation.Arguments);
        }
Exemplo n.º 2
0
 public static T CreateAs <T>(this Item item, bool isLazyLoad = true)
 {
     return((T)TypeMapper.CreateObject(item, typeof(T), isLazyLoad));
 }