Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26065
Modified Files:
AbstractAopProxyTypeBuilder.cs
Log Message:
SPRNET-606 - Fix in .NET 2.0 for problems with attributes in proxy generation.
Index: AbstractAopProxyTypeBuilder.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyTypeBuilder.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** AbstractAopProxyTypeBuilder.cs 2 Aug 2007 16:28:29 -0000 1.3
--- AbstractAopProxyTypeBuilder.cs 11 Oct 2007 05:57:15 -0000 1.4
***************
*** 23,32 ****
using System;
using System.Collections;
- using System.Reflection;
using System.Reflection.Emit;
- using Spring.Util;
using Spring.Proxy;
#endregion
--- 23,31 ----
using System;
using System.Collections;
using System.Reflection.Emit;
using Spring.Proxy;
+
#endregion
***************
*** 42,45 ****
--- 41,68 ----
AbstractProxyTypeBuilder, IAopProxyTypeGenerator
{
+ #region Fields
+
+ private readonly IList _typeAttributesToExclude;
+
+ #endregion
+
+ #region Constructors
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="AbstractAopProxyTypeBuilder"/> class.
+ /// </summary>
+ protected AbstractAopProxyTypeBuilder()
+ : base()
+ {
+ _typeAttributesToExclude = new ArrayList(
+ new Type[] {typeof (SerializableAttribute)});
+ foreach (Type attributeType in base.TypeAttributesToExclude)
+ {
+ _typeAttributesToExclude.Add(attributeType);
+ }
+ }
+
+ #endregion
+
#region IProxyTypeGenerator Members
***************
*** 101,104 ****
--- 124,141 ----
return attrs;
}
+
+
+ #endregion
+
+ #region Protected Properties
+
+ /// <summary>
+ /// Gets the type of attributes to exclude form the proxy
+ /// </summary>
+ /// <value>The type of attributes to exclude from the proxy</value>
+ protected override IList TypeAttributesToExclude
+ {
+ get { return _typeAttributesToExclude; }
+ }
#endregion
|