https://bugzilla.novell.com/show_bug.cgi?id=651556
https://bugzilla.novell.com/show_bug.cgi?id=651556#c0 Summary: PropertyDescriptor.GetChildProperties(null) returns no properties Classification: Mono Product: Mono: Class Libraries Version: 2.6.x Platform: x86 OS/Version: Windows 7 Status: NEW Severity: Normal Priority: P5 - None Component: Sys.Core AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1036 Safari/532.5 PropertyDescriptor.GetChildProperties(null) should return the properties of PropertyType, but instead it returns an empty collection. Reproducible: Always Steps to Reproduce: 1. Create a data type say public class Entity { public NestedEntity Property { get; set; } } 2. Call TypeDescriptor.GetProperties(typeof(Entity))["Property"].GetChildProperties(null) Actual Results: An empty PropertyDescriptorCollection is returned. Expected Results: The properties of the type of the Property property (ie. the properties of the NestedEntity type). Easily fixed, change: public virtual PropertyDescriptorCollection GetChildProperties (object instance, Attribute[] filter) { return TypeDescriptor.GetProperties (instance, filter); } to public virtual PropertyDescriptorCollection GetChildProperties (object instance, Attribute[] filter) { return instance == null ? TypeDescriptor.GetProperties(PropertyType, filter) : TypeDescriptor.GetProperties(instance, filter); } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
