Author: zoltan
Date: 2005-06-06 14:08:49 -0400 (Mon, 06 Jun 2005)
New Revision: 45512
Modified:
trunk/mcs/class/corlib/System/ChangeLog
trunk/mcs/class/corlib/System/MonoCustomAttrs.cs
trunk/mcs/class/corlib/System/Type.cs
Log:
2005-06-06 Zoltan Varga <[EMAIL PROTECTED]>
* Type.cs MonoCustomAttrs.cs: Return SerializableAttribute for types as
well.
Modified: trunk/mcs/class/corlib/System/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System/ChangeLog 2005-06-06 18:04:15 UTC (rev
45511)
+++ trunk/mcs/class/corlib/System/ChangeLog 2005-06-06 18:08:49 UTC (rev
45512)
@@ -1,3 +1,7 @@
+2005-06-06 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * Type.cs MonoCustomAttrs.cs: Return SerializableAttribute for types as
well.
+
2005-06-06 Sebastien Pouliot <[EMAIL PROTECTED]>
* Exception.cs: Implements _Exception only for 2.0.
Modified: trunk/mcs/class/corlib/System/MonoCustomAttrs.cs
===================================================================
--- trunk/mcs/class/corlib/System/MonoCustomAttrs.cs 2005-06-06 18:04:15 UTC
(rev 45511)
+++ trunk/mcs/class/corlib/System/MonoCustomAttrs.cs 2005-06-06 18:08:49 UTC
(rev 45512)
@@ -57,6 +57,8 @@
pseudoAttrs =
((FieldInfo)obj).GetPseudoCustomAttributes ();
else if (obj is ParameterInfo)
pseudoAttrs =
((ParameterInfo)obj).GetPseudoCustomAttributes ();
+ else if (obj is Type)
+ pseudoAttrs =
((Type)obj).GetPseudoCustomAttributes ();
if (pseudoAttrs != null) {
object[] res = new object [attrs.Length +
pseudoAttrs.Length];
Modified: trunk/mcs/class/corlib/System/Type.cs
===================================================================
--- trunk/mcs/class/corlib/System/Type.cs 2005-06-06 18:04:15 UTC (rev
45511)
+++ trunk/mcs/class/corlib/System/Type.cs 2005-06-06 18:08:49 UTC (rev
45512)
@@ -1185,6 +1185,24 @@
return attr;
}
}
+
+ internal object[] GetPseudoCustomAttributes () {
+ int count = 0;
+
+ if (IsSerializable)
+ count ++;
+
+ if (count == 0)
+ return null;
+ object[] attrs = new object [count];
+ count = 0;
+
+ if (IsSerializable)
+ attrs [count ++] = new SerializableAttribute ();
+
+ return attrs;
+ }
+
#endif
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches