void LoadAttributes(XElement element, Class @class) { foreach(XElement elem in element.Elements()) { var typeAttr = elem.Attribute("type"); string elemName = elem.Name.LocalName; AttributeProperty property = new AttributeProperty(AttributeValueOrDefault(elem, "name"), elemName, GetType(typeAttr)); @class.Properties.Add(property); } }
public void Visit(AttributeProperty property) { AddSimplePropertyInitializer(property, isAttribute: true); }