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;
     }
 }
Beispiel #2
0
 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);
     }
 }
Beispiel #3
0
 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;
     }
 }