Author: igorz
Date: 2007-07-11 09:09:16 -0400 (Wed, 11 Jul 2007)
New Revision: 81794
Modified:
trunk/mcs/class/System/System.ComponentModel/ChangeLog
trunk/mcs/class/System/System.ComponentModel/ReflectionPropertyDescriptor.cs
Log:
2007-07-11 Igor Zelmanovich <[EMAIL PROTECTED]>
* ReflectionPropertyDescriptor: fixed ShouldSerializeValue:
MSDN: If this method cannot find a DefaultValueAttribute or
a ShouldSerializeMyProperty method, it cannot create optimizations
and it returns true.
Modified: trunk/mcs/class/System/System.ComponentModel/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.ComponentModel/ChangeLog 2007-07-11
12:42:22 UTC (rev 81793)
+++ trunk/mcs/class/System/System.ComponentModel/ChangeLog 2007-07-11
13:09:16 UTC (rev 81794)
@@ -1,6 +1,13 @@
2007-07-11 Igor Zelmanovich <[EMAIL PROTECTED]>
* ReflectionPropertyDescriptor: fixed ShouldSerializeValue:
+ MSDN: If this method cannot find a DefaultValueAttribute or
+ a ShouldSerializeMyProperty method, it cannot create optimizations
+ and it returns true.
+
+2007-07-11 Igor Zelmanovich <[EMAIL PROTECTED]>
+
+ * ReflectionPropertyDescriptor: fixed ShouldSerializeValue:
avoid NullReferenceException.
2007-07-10 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
Modified:
trunk/mcs/class/System/System.ComponentModel/ReflectionPropertyDescriptor.cs
===================================================================
---
trunk/mcs/class/System/System.ComponentModel/ReflectionPropertyDescriptor.cs
2007-07-11 12:42:22 UTC (rev 81793)
+++
trunk/mcs/class/System/System.ComponentModel/ReflectionPropertyDescriptor.cs
2007-07-11 13:09:16 UTC (rev 81794)
@@ -243,8 +243,9 @@
MethodInfo mi = FindPropertyMethod (component,
"ShouldSerialize");
if (mi != null)
return (bool) mi.Invoke (component,
null);
-
- return false;
+ // MSDN: If this method cannot find a
DefaultValueAttribute or a ShouldSerializeMyProperty method,
+ // it cannot create optimizations and it
returns true.
+ return true;
}
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches