|
From: <fab...@us...> - 2011-02-19 13:55:00
|
Revision: 5384
http://nhibernate.svn.sourceforge.net/nhibernate/?rev=5384&view=rev
Author: fabiomaulo
Date: 2011-02-19 13:54:53 +0000 (Sat, 19 Feb 2011)
Log Message:
-----------
Apply patch of NH-2455 (thanks Michael DELVA)
Modified Paths:
--------------
trunk/nhibernate/src/NHibernate/Bytecode/IProxyFactoryFactory.cs
trunk/nhibernate/src/NHibernate/Engine/CascadingAction.cs
trunk/nhibernate/src/NHibernate/Engine/ForeignKeys.cs
trunk/nhibernate/src/NHibernate/Engine/StatefulPersistenceContext.cs
trunk/nhibernate/src/NHibernate/Event/Default/DefaultEvictEventListener.cs
trunk/nhibernate/src/NHibernate/Event/Default/DefaultMergeEventListener.cs
trunk/nhibernate/src/NHibernate/Event/Default/DefaultPersistEventListener.cs
trunk/nhibernate/src/NHibernate/Event/Default/DefaultSaveOrUpdateEventListener.cs
trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs
trunk/nhibernate/src/NHibernate/Impl/StatelessSessionImpl.cs
trunk/nhibernate/src/NHibernate/Intercept/AbstractFieldInterceptor.cs
trunk/nhibernate/src/NHibernate/NHibernateUtil.cs
trunk/nhibernate/src/NHibernate/Proxy/NHibernateProxyHelper.cs
trunk/nhibernate/src/NHibernate/Type/CollectionType.cs
trunk/nhibernate/src/NHibernate/Type/EntityType.cs
trunk/nhibernate/src/NHibernate.ByteCode.Castle/ProxyFactoryFactory.cs
trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ProxyInterface/CustomProxyFixture.cs
trunk/nhibernate/src/NHibernate.ByteCode.LinFu/ProxyFactoryFactory.cs
trunk/nhibernate/src/NHibernate.Test/Bytecode/WrongProxyFactoryFactory.cs
Modified: trunk/nhibernate/src/NHibernate/Bytecode/IProxyFactoryFactory.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Bytecode/IProxyFactoryFactory.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/Bytecode/IProxyFactoryFactory.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -38,5 +38,7 @@
IProxyValidator ProxyValidator { get; }
bool IsInstrumented(System.Type entityClass);
+
+ bool IsProxy(object entity);
}
}
\ No newline at end of file
Modified: trunk/nhibernate/src/NHibernate/Engine/CascadingAction.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Engine/CascadingAction.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/Engine/CascadingAction.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -371,7 +371,7 @@
{
string childEntityName = ((EntityType)type).GetAssociatedEntityName(session.Factory);
- if (!IsInManagedState(child, session) && !(child is INHibernateProxy) && ForeignKeys.IsTransient(childEntityName, child, null, session))
+ if (!IsInManagedState(child, session) && !(child.IsProxy()) && ForeignKeys.IsTransient(childEntityName, child, null, session))
{
string parentEntiytName = persister.EntityName;
string propertyName = persister.PropertyNames[propertyIndex];
Modified: trunk/nhibernate/src/NHibernate/Engine/ForeignKeys.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Engine/ForeignKeys.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/Engine/ForeignKeys.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -102,10 +102,11 @@
//if (obj == org.hibernate.intercept.LazyPropertyInitializer_Fields.UNFETCHED_PROPERTY)
// return false; //this is kinda the best we can do...
- INHibernateProxy proxy = obj as INHibernateProxy;
- if (proxy != null)
+ if (obj.IsProxy())
{
- // if its an uninitialized proxy it can't be transient
+ INHibernateProxy proxy = obj as INHibernateProxy;
+
+ // if its an uninitialized proxy it can't be transient
ILazyInitializer li = proxy.HibernateLazyInitializer;
if (li.GetImplementation(session) == null)
{
@@ -156,7 +157,7 @@
/// </remarks>
public static bool IsNotTransient(string entityName, System.Object entity, bool? assumed, ISessionImplementor session)
{
- if (entity is INHibernateProxy)
+ if (entity.IsProxy())
return true;
if (session.PersistenceContext.IsEntryFor(entity))
return true;
Modified: trunk/nhibernate/src/NHibernate/Engine/StatefulPersistenceContext.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Engine/StatefulPersistenceContext.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/Engine/StatefulPersistenceContext.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -572,10 +572,11 @@
//{
// value = wrapper.Element;
//}
- var proxy = value as INHibernateProxy;
- if (proxy != null)
+ if (value.IsProxy())
{
- if (log.IsDebugEnabled)
+ var proxy = value as INHibernateProxy;
+
+ if (log.IsDebugEnabled)
{
log.Debug("setting proxy identifier: " + id);
}
@@ -619,10 +620,11 @@
// maybeProxy = wrapper.Element;
//}
- INHibernateProxy proxy = maybeProxy as INHibernateProxy;
- if (proxy != null)
+ if (maybeProxy.IsProxy())
{
- ILazyInitializer li = proxy.HibernateLazyInitializer;
+ INHibernateProxy proxy = maybeProxy as INHibernateProxy;
+
+ ILazyInitializer li = proxy.HibernateLazyInitializer;
if (li.IsUninitialized)
throw new PersistentObjectException("object was an uninitialized proxy for " + li.PersistentClass.FullName);
@@ -647,10 +649,11 @@
//{
// maybeProxy = wrapper.Element;
//}
- var proxy = maybeProxy as INHibernateProxy;
- if (proxy != null)
+ if (maybeProxy.IsProxy())
{
- ILazyInitializer li = proxy.HibernateLazyInitializer;
+ var proxy = maybeProxy as INHibernateProxy;
+
+ ILazyInitializer li = proxy.HibernateLazyInitializer;
ReassociateProxy(li, proxy);
return li.GetImplementation(); //initialize + unwrap the object
}
Modified: trunk/nhibernate/src/NHibernate/Event/Default/DefaultEvictEventListener.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Event/Default/DefaultEvictEventListener.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/Event/Default/DefaultEvictEventListener.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -24,7 +24,7 @@
object obj = @event.Entity;
IPersistenceContext persistenceContext = source.PersistenceContext;
- if (obj is INHibernateProxy)
+ if (obj.IsProxy())
{
ILazyInitializer li = ((INHibernateProxy)obj).HibernateLazyInitializer;
object id = li.Identifier;
Modified: trunk/nhibernate/src/NHibernate/Event/Default/DefaultMergeEventListener.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Event/Default/DefaultMergeEventListener.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/Event/Default/DefaultMergeEventListener.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -90,7 +90,7 @@
if (original != null)
{
object entity;
- if (original is INHibernateProxy)
+ if (original.IsProxy())
{
ILazyInitializer li = ((INHibernateProxy)original).HibernateLazyInitializer;
if (li.IsUninitialized)
@@ -521,7 +521,7 @@
{
object entityCopy = copyCache[entity];
- if (entityCopy is INHibernateProxy)
+ if (entityCopy.IsProxy())
entityCopy = ((INHibernateProxy)entityCopy).HibernateLazyInitializer.GetImplementation();
// NH-specific: Disregard entities that implement ILifecycle and manage their own state - they
Modified: trunk/nhibernate/src/NHibernate/Event/Default/DefaultPersistEventListener.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Event/Default/DefaultPersistEventListener.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/Event/Default/DefaultPersistEventListener.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -38,7 +38,7 @@
object obj = @event.Entity;
object entity;
- if (obj is INHibernateProxy)
+ if (obj.IsProxy())
{
ILazyInitializer li = ((INHibernateProxy)obj).HibernateLazyInitializer;
if (li.IsUninitialized)
Modified: trunk/nhibernate/src/NHibernate/Event/Default/DefaultSaveOrUpdateEventListener.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Event/Default/DefaultSaveOrUpdateEventListener.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/Event/Default/DefaultSaveOrUpdateEventListener.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -31,7 +31,7 @@
{
//assign the requested id to the proxy, *before*
//reassociating the proxy
- if (obj is INHibernateProxy)
+ if (obj.IsProxy())
{
((INHibernateProxy)obj).HibernateLazyInitializer.Identifier = requestedId;
}
Modified: trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/Impl/SessionImpl.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -432,10 +432,11 @@
{
throw new ArgumentNullException("obj", "null object passed to GetCurrentLockMode");
}
- var proxy = obj as INHibernateProxy;
- if (proxy != null)
+
+ if (obj.IsProxy())
{
- obj = proxy.HibernateLazyInitializer.GetImplementation(this);
+ var proxy = obj as INHibernateProxy;
+ obj = proxy.HibernateLazyInitializer.GetImplementation(this);
if (obj == null)
{
return LockMode.None;
@@ -1040,10 +1041,10 @@
{
using (new SessionIdLoggingContext(SessionId))
{
- INHibernateProxy proxy = entity as INHibernateProxy;
- if (proxy != null)
+ if (entity.IsProxy())
{
- ILazyInitializer initializer = proxy.HibernateLazyInitializer;
+ INHibernateProxy proxy = entity as INHibernateProxy;
+ ILazyInitializer initializer = proxy.HibernateLazyInitializer;
// it is possible for this method to be called during flush processing,
// so make certain that we do not accidently initialize an uninitialized proxy
@@ -1292,10 +1293,12 @@
using (new SessionIdLoggingContext(SessionId))
{
CheckAndUpdateSessionStatus();
- var proxy = obj as INHibernateProxy;
- if (proxy != null)
+
+ if (obj.IsProxy())
{
- if (!persistenceContext.ContainsProxy(proxy))
+ var proxy = obj as INHibernateProxy;
+
+ if (!persistenceContext.ContainsProxy(proxy))
{
throw new TransientObjectException("proxy was not associated with the session");
}
@@ -1517,10 +1520,12 @@
// Actually the case for proxies will probably work even with
// the session closed, but do the check here anyway, so that
// the behavior is uniform.
- var proxy = obj as INHibernateProxy;
- if (proxy != null)
+
+ if (obj.IsProxy())
{
- ILazyInitializer li = proxy.HibernateLazyInitializer;
+ var proxy = obj as INHibernateProxy;
+
+ ILazyInitializer li = proxy.HibernateLazyInitializer;
if (li.Session != this)
{
throw new TransientObjectException("The proxy was not associated with this session");
@@ -1547,10 +1552,11 @@
{
using (new SessionIdLoggingContext(SessionId))
{
- INHibernateProxy proxy = obj as INHibernateProxy;
- if (proxy != null)
+ if (obj.IsProxy())
{
- return proxy.HibernateLazyInitializer.Identifier;
+ INHibernateProxy proxy = obj as INHibernateProxy;
+
+ return proxy.HibernateLazyInitializer.Identifier;
}
else
{
@@ -1942,10 +1948,12 @@
using (new SessionIdLoggingContext(SessionId))
{
CheckAndUpdateSessionStatus();
- var proxy = obj as INHibernateProxy;
- if (proxy != null)
+
+ if (obj.IsProxy())
{
- //do not use proxiesByKey, since not all
+ var proxy = obj as INHibernateProxy;
+
+ //do not use proxiesByKey, since not all
//proxies that point to this session's
//instances are in that collection!
ILazyInitializer li = proxy.HibernateLazyInitializer;
Modified: trunk/nhibernate/src/NHibernate/Impl/StatelessSessionImpl.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Impl/StatelessSessionImpl.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/Impl/StatelessSessionImpl.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -470,10 +470,10 @@
{
using (new SessionIdLoggingContext(SessionId))
{
- INHibernateProxy proxy = entity as INHibernateProxy;
- if (proxy != null)
+ if (entity.IsProxy())
{
- entity = proxy.HibernateLazyInitializer.GetImplementation();
+ INHibernateProxy proxy = entity as INHibernateProxy;
+ entity = proxy.HibernateLazyInitializer.GetImplementation();
}
return GuessEntityName(entity);
}
Modified: trunk/nhibernate/src/NHibernate/Intercept/AbstractFieldInterceptor.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Intercept/AbstractFieldInterceptor.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/Intercept/AbstractFieldInterceptor.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -114,10 +114,12 @@
{
return InitializeField(fieldName, target);
}
- var nhproxy = value as INHibernateProxy;
- if (nhproxy != null && unwrapProxyFieldNames != null && unwrapProxyFieldNames.Contains(fieldName))
+
+ if (value.IsProxy() && unwrapProxyFieldNames != null && unwrapProxyFieldNames.Contains(fieldName))
{
- return InitializeOrGetAssociation(nhproxy, fieldName);
+ var nhproxy = value as INHibernateProxy;
+
+ return InitializeOrGetAssociation(nhproxy, fieldName);
}
return InvokeImplementation;
}
Modified: trunk/nhibernate/src/NHibernate/NHibernateUtil.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/NHibernateUtil.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/NHibernateUtil.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -365,7 +365,7 @@
{
return;
}
- else if (proxy is INHibernateProxy)
+ else if (proxy.IsProxy())
{
((INHibernateProxy)proxy).HibernateLazyInitializer.Initialize();
}
@@ -382,7 +382,7 @@
/// <returns>true if the argument is already initialized, or is not a proxy or collection</returns>
public static bool IsInitialized(object proxy)
{
- if (proxy is INHibernateProxy)
+ if (proxy.IsProxy())
{
return !((INHibernateProxy)proxy).HibernateLazyInitializer.IsUninitialized;
}
@@ -404,7 +404,7 @@
/// <returns>the true class of the instance</returns>
public static System.Type GetClass(object proxy)
{
- if (proxy is INHibernateProxy)
+ if (proxy.IsProxy())
{
return ((INHibernateProxy)proxy).HibernateLazyInitializer.GetImplementation().GetType();
}
@@ -530,7 +530,7 @@
public static bool IsPropertyInitialized(object proxy, string propertyName)
{
object entity;
- if (proxy is INHibernateProxy)
+ if (proxy.IsProxy())
{
ILazyInitializer li = ((INHibernateProxy)proxy).HibernateLazyInitializer;
if (li.IsUninitialized)
Modified: trunk/nhibernate/src/NHibernate/Proxy/NHibernateProxyHelper.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Proxy/NHibernateProxyHelper.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/Proxy/NHibernateProxyHelper.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -1,3 +1,4 @@
+using NHibernate.Cfg;
using NHibernate.Intercept;
using NHibernate.Persister.Entity;
@@ -8,9 +9,9 @@
/// objects that might be instances of Classes or the Proxied version of
/// the Class.
/// </summary>
- public sealed class NHibernateProxyHelper
+ public static class NHibernateProxyHelper
{
- private NHibernateProxyHelper()
+ static NHibernateProxyHelper()
{
//can't instantiate
}
@@ -23,10 +24,11 @@
/// <returns>The Underlying Type for the object regardless of if it is a Proxy.</returns>
public static System.Type GetClassWithoutInitializingProxy(object obj)
{
- INHibernateProxy proxy = obj as INHibernateProxy;
- if (proxy != null)
+ if (obj.IsProxy())
{
- return proxy.HibernateLazyInitializer.PersistentClass;
+ INHibernateProxy proxy = obj as INHibernateProxy;
+
+ return proxy.HibernateLazyInitializer.PersistentClass;
}
else
{
@@ -45,10 +47,10 @@
/// </remarks>
public static System.Type GuessClass(object entity)
{
- var proxy = entity as INHibernateProxy;
- if (proxy != null)
+ if (entity.IsProxy())
{
- ILazyInitializer li = proxy.HibernateLazyInitializer;
+ var proxy = entity as INHibernateProxy;
+ ILazyInitializer li = proxy.HibernateLazyInitializer;
if (li.IsUninitialized)
{
return li.PersistentClass;
@@ -63,5 +65,10 @@
}
return entity.GetType();
}
+
+ public static bool IsProxy(this object entity)
+ {
+ return Environment.BytecodeProvider.ProxyFactoryFactory.IsProxy(entity);
+ }
}
}
Modified: trunk/nhibernate/src/NHibernate/Type/CollectionType.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Type/CollectionType.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/Type/CollectionType.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -583,10 +583,12 @@
{
object element = elem;
// worrying about proxies is perhaps a little bit of overkill here...
- INHibernateProxy proxy = element as INHibernateProxy;
- if (proxy != null)
+
+ if (element.IsProxy())
{
- ILazyInitializer li = proxy.HibernateLazyInitializer;
+ INHibernateProxy proxy = element as INHibernateProxy;
+
+ ILazyInitializer li = proxy.HibernateLazyInitializer;
if (!li.IsUninitialized)
element = li.GetImplementation();
}
Modified: trunk/nhibernate/src/NHibernate/Type/EntityType.cs
===================================================================
--- trunk/nhibernate/src/NHibernate/Type/EntityType.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate/Type/EntityType.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -63,10 +63,11 @@
}
object xid;
- INHibernateProxy proxy = x as INHibernateProxy;
- if (proxy!=null)
+
+ if (x.IsProxy())
{
- xid = proxy.HibernateLazyInitializer.Identifier;
+ INHibernateProxy proxy = x as INHibernateProxy;
+ xid = proxy.HibernateLazyInitializer.Identifier;
}
else
{
@@ -74,10 +75,11 @@
}
object yid;
- proxy = y as INHibernateProxy;
- if (proxy != null)
+
+ if (y.IsProxy())
{
- yid = proxy.HibernateLazyInitializer.Identifier;
+ INHibernateProxy proxy = y as INHibernateProxy;
+ yid = proxy.HibernateLazyInitializer.Identifier;
}
else
{
@@ -139,11 +141,12 @@
/// <returns> The extracted identifier. </returns>
private static object GetIdentifier(object obj, IEntityPersister persister, EntityMode entityMode)
{
- INHibernateProxy proxy = obj as INHibernateProxy;
- if (proxy != null)
+ if (obj.IsProxy())
{
- ILazyInitializer li = proxy.HibernateLazyInitializer;
- return li.Identifier;
+ INHibernateProxy proxy = obj as INHibernateProxy;
+ ILazyInitializer li = proxy.HibernateLazyInitializer;
+
+ return li.Identifier;
}
else
{
@@ -392,10 +395,10 @@
object proxyOrEntity = session.InternalLoad(GetAssociatedEntityName(), id, eager, IsNullable && !isProxyUnwrapEnabled);
- INHibernateProxy proxy = proxyOrEntity as INHibernateProxy;
- if (proxy!=null)
+ if (proxyOrEntity.IsProxy())
{
- proxy.HibernateLazyInitializer.Unwrap = isProxyUnwrapEnabled;
+ INHibernateProxy proxy = proxyOrEntity as INHibernateProxy;
+ proxy.HibernateLazyInitializer.Unwrap = isProxyUnwrapEnabled;
}
return proxyOrEntity;
@@ -488,10 +491,11 @@
}
object id;
- INHibernateProxy proxy = x as INHibernateProxy;
- if (proxy!=null)
+
+ if (x.IsProxy())
{
- id = proxy.HibernateLazyInitializer.Identifier;
+ INHibernateProxy proxy = x as INHibernateProxy;
+ id = proxy.HibernateLazyInitializer.Identifier;
}
else
{
Modified: trunk/nhibernate/src/NHibernate.ByteCode.Castle/ProxyFactoryFactory.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.ByteCode.Castle/ProxyFactoryFactory.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate.ByteCode.Castle/ProxyFactoryFactory.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -23,6 +23,11 @@
return true;
}
- #endregion
+ public bool IsProxy(object entity)
+ {
+ return entity is INHibernateProxy;
+ }
+
+ #endregion
}
}
\ No newline at end of file
Modified: trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ProxyInterface/CustomProxyFixture.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ProxyInterface/CustomProxyFixture.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate.ByteCode.Castle.Tests/ProxyInterface/CustomProxyFixture.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -75,7 +75,12 @@
return false;
}
- #endregion
+ public bool IsProxy(object entity)
+ {
+ return entity is INHibernateProxy;
+ }
+
+ #endregion
}
public class DataBindingProxyFactory : ProxyFactory
Modified: trunk/nhibernate/src/NHibernate.ByteCode.LinFu/ProxyFactoryFactory.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.ByteCode.LinFu/ProxyFactoryFactory.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate.ByteCode.LinFu/ProxyFactoryFactory.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -24,6 +24,11 @@
return false;
}
+ public bool IsProxy(object entity)
+ {
+ return entity is INHibernateProxy;
+ }
+
#endregion
}
}
\ No newline at end of file
Modified: trunk/nhibernate/src/NHibernate.Test/Bytecode/WrongProxyFactoryFactory.cs
===================================================================
--- trunk/nhibernate/src/NHibernate.Test/Bytecode/WrongProxyFactoryFactory.cs 2011-02-18 06:26:18 UTC (rev 5383)
+++ trunk/nhibernate/src/NHibernate.Test/Bytecode/WrongProxyFactoryFactory.cs 2011-02-19 13:54:53 UTC (rev 5384)
@@ -28,6 +28,11 @@
return false;
}
+ public bool IsProxy(object entity)
+ {
+ return entity is INHibernateProxy;
+ }
+
#endregion
}
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|