public PropertyDescriptorCollection GetProperties() { if (node.Attributes != null) { PropertyDescriptor[] props = new PropertyDescriptor [node.Attributes.Count]; for (int n = 0; n < props.Length; n++) { props [n] = new XmlDataSourcePropertyDescriptor(node.Attributes [n].Name, node.IsReadOnly); } return(new PropertyDescriptorCollection(props)); } else { return(PropertyDescriptorCollection.Empty); } }
public PropertyDescriptorCollection GetProperties() { if (node.Attributes != null) { PropertyDescriptor[] props = new PropertyDescriptor [node.Attributes.Count]; for (int n=0; n<props.Length; n++) props [n] = new XmlDataSourcePropertyDescriptor (node.Attributes [n].Name, node.IsReadOnly); return new PropertyDescriptorCollection (props); } else return PropertyDescriptorCollection.Empty; }