public void PropertyNameCustomization() { PropertyDescriptor property = Thing.GetField1Property(); Assert.AreEqual("Field1", property.Name); IPropertyCustomization customization = (IPropertyCustomization)property; customization.SetName("FIELD1"); Assert.AreEqual("FIELD1", property.Name); }
private static void SetName(PropertyDescriptor property, string name) { Debug.Assert(property != null); Debug.Assert(name != null); Debug.Assert(name.Length > 0); IPropertyCustomization customization = (IPropertyCustomization)property; customization.SetName(name); }
protected virtual void ApplyCustomization(PropertyDescriptor property) { if (property == null) { throw new ArgumentNullException("property"); } if (Name.Length == 0) { return; } IPropertyCustomization customization = (IPropertyCustomization)property; customization.SetName(Name); }