Author: yaslama
Date: 2007-10-11 12:37:29 -0400 (Thu, 11 Oct 2007)
New Revision: 87341

Modified:
   
branches/mainsoft/gh20/mcs/class/System/System.ComponentModel/ReflectionPropertyDescriptor.cs
Log:
ReflectionPropertyDescriptor: fixed ShouldSerializeValue
MSDN: If this method cannot find a DefaultValueAttribute or
a ShouldSerializeMyProperty method, it cannot create optimizations
and it returns true.

Merged from r81794 by Igor Zelmanovich <[EMAIL PROTECTED]>


Modified: 
branches/mainsoft/gh20/mcs/class/System/System.ComponentModel/ReflectionPropertyDescriptor.cs
===================================================================
--- 
branches/mainsoft/gh20/mcs/class/System/System.ComponentModel/ReflectionPropertyDescriptor.cs
       2007-10-11 16:07:10 UTC (rev 87340)
+++ 
branches/mainsoft/gh20/mcs/class/System/System.ComponentModel/ReflectionPropertyDescriptor.cs
       2007-10-11 16:37:29 UTC (rev 87341)
@@ -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

Reply via email to