Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Proxy
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv3066/Proxy
Modified Files:
AbstractProxyTypeBuilder.cs
Log Message:
Problems with Attributes in proxy generation [SPRNET-606]
Index: AbstractProxyTypeBuilder.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Proxy/AbstractProxyTypeBuilder.cs,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** AbstractProxyTypeBuilder.cs 3 Dec 2007 09:07:18 -0000 1.30
--- AbstractProxyTypeBuilder.cs 3 Dec 2007 23:31:27 -0000 1.31
***************
*** 373,377 ****
}
}
! catch(CustomAttributeFormatException)
{
// http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=161522
--- 373,382 ----
}
}
! catch (ArgumentException)
! {
! // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296032
! attributes.AddRange(type.GetCustomAttributes(false));
! }
! catch (CustomAttributeFormatException)
{
// http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=161522
***************
*** 407,413 ****
// add attributes that apply to the target method
#if NET_2_0
! foreach (CustomAttributeData cad in CustomAttributeData.GetCustomAttributes(method))
{
! attributes.Add(cad);
}
#else
--- 412,426 ----
// add attributes that apply to the target method
#if NET_2_0
! try
{
! foreach (CustomAttributeData cad in CustomAttributeData.GetCustomAttributes(method))
! {
! attributes.Add(cad);
! }
! }
! catch (ArgumentException)
! {
! // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296032
! attributes.AddRange(method.GetCustomAttributes(false));
}
#else
***************
*** 452,458 ****
{
// add attributes that apply to the target method' return type
! foreach (CustomAttributeData cad in CustomAttributeData.GetCustomAttributes(method.ReturnParameter))
{
! attributes.Add(cad);
}
}
--- 465,479 ----
{
// add attributes that apply to the target method' return type
! try
{
! foreach (CustomAttributeData cad in CustomAttributeData.GetCustomAttributes(method.ReturnParameter))
! {
! attributes.Add(cad);
! }
! }
! catch (ArgumentException)
! {
! // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296032
! attributes.AddRange(method.ReturnTypeCustomAttributes.GetCustomAttributes(false));
}
}
***************
*** 482,488 ****
// add attributes that apply to the target method's parameter
#if NET_2_0
! foreach (CustomAttributeData cad in CustomAttributeData.GetCustomAttributes(paramInfo))
{
! attributes.Add(cad);
}
#else
--- 503,517 ----
// add attributes that apply to the target method's parameter
#if NET_2_0
! try
{
! foreach (CustomAttributeData cad in CustomAttributeData.GetCustomAttributes(paramInfo))
! {
! attributes.Add(cad);
! }
! }
! catch (ArgumentException)
! {
! // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296032
! attributes.AddRange(paramInfo.GetCustomAttributes(false));
}
#else
|