internal PropertySerializationInfo(Type type) { ArrayList list = new ArrayList(); this.elementProperties = new Hashtable(); foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(type)) { DataSourceXmlSerializationAttribute serializationAttribute = (DataSourceXmlSerializationAttribute)descriptor.Attributes[typeof(DataSourceXmlSerializationAttribute)]; if (serializationAttribute != null) { DataSourceXmlSerializer.XmlSerializableProperty property = new DataSourceXmlSerializer.XmlSerializableProperty(serializationAttribute, descriptor); if (serializationAttribute is DataSourceXmlAttributeAttribute) { list.Add(property); } else { this.elementProperties.Add(property.Name, property); } } } this.AttributeProperties = (DataSourceXmlSerializer.XmlSerializableProperty[])list.ToArray(typeof(DataSourceXmlSerializer.XmlSerializableProperty)); }
internal PropertySerializationInfo(Type type) { ArrayList list = new ArrayList(); this.elementProperties = new Hashtable(); foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(type)) { DataSourceXmlSerializationAttribute serializationAttribute = (DataSourceXmlSerializationAttribute) descriptor.Attributes[typeof(DataSourceXmlSerializationAttribute)]; if (serializationAttribute != null) { DataSourceXmlSerializer.XmlSerializableProperty property = new DataSourceXmlSerializer.XmlSerializableProperty(serializationAttribute, descriptor); if (serializationAttribute is DataSourceXmlAttributeAttribute) { list.Add(property); } else { this.elementProperties.Add(property.Name, property); } } } this.AttributeProperties = (DataSourceXmlSerializer.XmlSerializableProperty[]) list.ToArray(typeof(DataSourceXmlSerializer.XmlSerializableProperty)); }