private void AddMetaOsmElement <T>() { var elementType = typeof(T); var properties = OsmParserHelper.GetOsmProperties(elementType); _metaOsmElements.Add(elementType, properties); }
private void ApplyAttributes(XmlAttributeCollection attributes, object obj) { var osmProperties = _metaOsmElements[obj.GetType()]; foreach (XmlAttribute rootAttribute in attributes) { var attrName = rootAttribute.Name; var attrValue = rootAttribute.Value; if (osmProperties.ContainsKey(attrName)) { var property = osmProperties[attrName]; OsmParserHelper.SetValue(obj, property, attrValue); } } }