+2008-05-05 James Fitzsimons <james.fitzsimons@gmail.com>
+
+ * TypeDescriptor.cs: GetProperties should not return write-only
+ properties.
+
2008-04-26 Jb Evain <jbevain@novell.com>
* PropertyTabAttribute.cs, BindingList.cs: replace
PropertyInfo[] props = currentType.GetProperties (BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly);
foreach (PropertyInfo property in props) {
if (property.GetIndexParameters ().Length == 0 &&
+ property.CanRead &&
!propertiesHash.ContainsKey (property.Name)) {
propertiesList.Add (new ReflectionPropertyDescriptor (property));
propertiesHash.Add (property.Name, null);
+2008-05-05 Ivan N. Zlatev <contact@i-nz.net>
+
+ * TypeDescriptorTests.cs: Add test for handling write-only properties.
+ Based on patch by James Fitzsimons <james.fitzsimons@gmail.com>
+
2008-04-30 Gert Driesen <drieseng@users.sourceforge.net>
* ComponentConverterTests.cs: Allow test to be compiled using csc 1.x.
internal int Height {
get { return 0; }
}
+
+ public string WriteOnlyProperty {
+ set { prop = value; }
+ }
}
[DescriptionAttribute ("my test derived component")]
// (Type.GetProperties does return both properties)
//
Assert.AreEqual (1, yetAnotherPropsFound, "#G3");
+
+ // GetProperties does not return write-only properties (ones without a getter)
+ //
+ Assert.IsNull (col.Find ("WriteOnlyProperty", true), "#H1");
}
[Test]