public XmlAttributeTypeDescriptor(XmlAttributeCollection xmlAttributes) { if (xmlAttributes != null) { properties = XmlAttributePropertyDescriptor.GetProperties(xmlAttributes); } else { properties = new PropertyDescriptorCollection(new XmlAttributePropertyDescriptor[0]); } }
public void Init() { XmlDocument document = new XmlDocument(); document.LoadXml("<root first='a' second='b'/>"); firstAttribute = document.DocumentElement.GetAttributeNode("first"); properties = XmlAttributePropertyDescriptor.GetProperties(document.DocumentElement.Attributes); firstAttributePropertyDescriptor = (XmlAttributePropertyDescriptor)properties["first"]; secondAttributePropertyDescriptor = (XmlAttributePropertyDescriptor)properties["second"]; }