bool ProcessElementAttribute (PropertyInfo propertyInfo, XmlElementAttribute attribute) { if (attribute != null) { var name = string.IsNullOrEmpty (attribute.Name) ? propertyInfo.Name : attribute.Name; var id = PropertyName.CreateForElement (name, attribute.Prefix); var property = new ValuePropertyVisitor (attribute.OmitIfNull, propertyInfo); ProcessNestedAttributes (id, property); properties[id] = property; return true; } else { return false; } }
bool ProcessAttributeAttribute(PropertyInfo propertyInfo, XmlAttributeAttribute attribute) { if (attribute != null) { var name = string.IsNullOrEmpty(attribute.Name) ? propertyInfo.Name : attribute.Name; var id = PropertyName.CreateForAttribute(name, attribute.Prefix, null); properties[id] = new ValuePropertyVisitor(attribute.OmitIfNull, propertyInfo); return(true); } else { return(false); } }
bool ProcessElementAttribute(PropertyInfo propertyInfo, XmlElementAttribute attribute) { if (attribute != null) { var name = string.IsNullOrEmpty(attribute.Name) ? propertyInfo.Name : attribute.Name; var id = PropertyName.CreateForElement(name, attribute.Prefix); var property = new ValuePropertyVisitor(attribute.OmitIfNull, propertyInfo); ProcessNestedAttributes(id, property); properties[id] = property; return(true); } else { return(false); } }
bool ProcessAttributeAttribute (PropertyInfo propertyInfo, XmlAttributeAttribute attribute) { if (attribute != null) { var name = string.IsNullOrEmpty (attribute.Name) ? propertyInfo.Name : attribute.Name; var id = PropertyName.CreateForAttribute (name, attribute.Prefix, null); properties[id] = new ValuePropertyVisitor (attribute.OmitIfNull, propertyInfo); return true; } else { return false; } }