protected override void ParseName(XName name)
 {
     Name = name.LocalName.Split('.')[1];
     Type = GetPropertyType(Name, Parent.Type);
     // is it a collection?
     if (typeof(IEnumerable).IsAssignableFrom(Type) && Type != typeof(string))
         m_child = new PropertyCollectionParser(State, Parent);
     else
         m_child = new PropertyObjectParser(State, Parent);
     m_child.ParseName(name);
 }
Example #2
0
 protected override void ParseElement(XElement element)
 {
     // is it a property?
     if (element.Name.LocalName.Contains("."))
     {
         var propertyParser = new PropertyParser(State, this);
         propertyParser.Parse(element);
     }
     else
     {
         throw new NotImplementedException();
     }
 }
Example #3
0
 protected override void ParseElement(XElement element)
 {
     // is it a property?
     if (element.Name.LocalName.Contains("."))
     {
         var propertyParser = new PropertyParser(State, this);
         propertyParser.Parse(element);
     }
     else
     {
         throw new NotImplementedException();
     }
 }
 protected override void ParseName(XName name)
 {
     Name = name.LocalName.Split('.')[1];
     Type = GetPropertyType(Name, Parent.Type);
     // is it a collection?
     if (typeof(IEnumerable).IsAssignableFrom(Type) && Type != typeof(string))
     {
         m_child = new PropertyCollectionParser(State, Parent);
     }
     else
     {
         m_child = new PropertyObjectParser(State, Parent);
     }
     m_child.ParseName(name);
 }