* Type.cs MonoCustomAttrs.cs: Return SerializableAttribute for types as well.
svn path=/trunk/mcs/; revision=45512
+2005-06-06 Zoltan Varga <vargaz@freemail.hu>
+
+ * Type.cs MonoCustomAttrs.cs: Return SerializableAttribute for types as well.
+
2005-06-06 Sebastien Pouliot <sebastien@ximian.com>
* Exception.cs: Implements _Exception only for 2.0.
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];
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
}
}