예제 #1
0
 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);
 }
예제 #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();
     }
 }
예제 #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();
     }
 }
예제 #4
0
 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);
 }