ProxyHelper.cs 392 B

123456789101112131415
  1. using Castle.DynamicProxy;
  2. namespace Abp.Reflection
  3. {
  4. public static class ProxyHelper
  5. {
  6. /// <summary>
  7. /// Returns dynamic proxy target object if this is a proxied object, otherwise returns the given object.
  8. /// </summary>
  9. public static object UnProxy(object obj)
  10. {
  11. return ProxyUtil.GetUnproxiedInstance(obj);
  12. }
  13. }
  14. }