Update of /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aop/Interceptor
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32236/test/Spring/Spring.Aop.Tests/Aop/Interceptor
Modified Files:
NopInterceptor.cs SerializableNopInterceptor.cs
Log Message:
fix for SPRNET-847, SPRNET-846
Index: SerializableNopInterceptor.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aop/Interceptor/SerializableNopInterceptor.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SerializableNopInterceptor.cs 22 Oct 2005 15:30:49 -0000 1.2
--- SerializableNopInterceptor.cs 14 Jan 2008 20:49:47 -0000 1.3
***************
*** 39,47 ****
public SerializableNopInterceptor(SerializationInfo info, StreamingContext ctxt)
{
! this.count = (int) info.GetValue("Count", typeof(int));
! }
public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
{
info.AddValue("Count", Count);
}
--- 39,49 ----
public SerializableNopInterceptor(SerializationInfo info, StreamingContext ctxt)
{
! this.instanceId = (int) info.GetValue("InstanceId", typeof(int));
! this.count = (int)info.GetValue("Count", typeof(int));
! }
public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
{
+ info.AddValue("InstanceId", InstanceId);
info.AddValue("Count", Count);
}
Index: NopInterceptor.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/test/Spring/Spring.Aop.Tests/Aop/Interceptor/NopInterceptor.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** NopInterceptor.cs 9 Apr 2006 07:19:05 -0000 1.5
--- NopInterceptor.cs 14 Jan 2008 20:49:47 -0000 1.6
***************
*** 37,43 ****
public class NopInterceptor : IMethodBeforeAdvice
{
protected int count;
! public int Count
{
get { return this.count; }
--- 37,59 ----
public class NopInterceptor : IMethodBeforeAdvice
{
+ protected int instanceId;
protected int count;
!
! public NopInterceptor() : this(0)
! {
! }
!
! public NopInterceptor(int instanceId)
! {
! this.instanceId = instanceId;
! }
!
! public int InstanceId
! {
! get { return instanceId; }
! }
!
! public int Count
{
get { return this.count; }
***************
*** 59,68 ****
return true;
}
! return count == ((NopInterceptor) other).count;
}
public override int GetHashCode()
{
! return count;
}
}
--- 75,85 ----
return true;
}
! return (instanceId == ((NopInterceptor) other).InstanceId)
! && (count == ((NopInterceptor) other).count);
}
public override int GetHashCode()
{
! return instanceId + 13 * count;
}
}
|