public void Intercept(IInvocation invocation) { if (_classType == null) { _classType = TypeMapper.CreateObject(_item, _targetType, false); } invocation.ReturnValue = invocation.Method.Invoke(_classType, invocation.Arguments); }
public static T CreateAs <T>(this Item item, bool isLazyLoad = true) { return((T)TypeMapper.CreateObject(item, typeof(T), isLazyLoad)); }