|
|
|
@ -5,13 +5,14 @@ namespace Volo.Abp.DynamicProxy |
|
|
|
{ |
|
|
|
public static class ProxyHelper |
|
|
|
{ |
|
|
|
private const string ProxyNamespace = "Castle.Proxies"; |
|
|
|
/// <summary>
|
|
|
|
/// Returns dynamic proxy target object if this is a proxied object, otherwise returns the given object.
|
|
|
|
/// It supports Castle Dynamic Proxies.
|
|
|
|
/// </summary>
|
|
|
|
public static object UnProxy(object obj) |
|
|
|
{ |
|
|
|
if (obj.GetType().Namespace != "Castle.Proxies") |
|
|
|
if (obj.GetType().Namespace != ProxyNamespace) |
|
|
|
{ |
|
|
|
return obj; |
|
|
|
} |
|
|
|
|