Esempio n. 1
0
 private static void ParseAttributes(ParserContext context)
 {
     foreach (XAttribute attribute in context.XElement.Attributes())
     {
         PropertyBindingAttributePair propertyBinding = PropertyBinder.GetPropertyBinding(context, attribute.Name, true);
         ParseChildXObject(context, attribute, attribute.Value, propertyBinding == null ? null : propertyBinding.Property);
     }
 }
Esempio n. 2
0
        private static void ParseChildElements(ParserContext context)
        {
            foreach (XElement childElement in context.XElement.Elements())
            {
                PropertyBindingAttributePair propertyBinding = PropertyBinder.GetPropertyBinding(context, childElement.Name, false);
                ParseChildXObject(context, childElement, childElement.Value, propertyBinding == null ? null : propertyBinding.Property);
            }

            XElement element = context.XElement;
            PropertyBindingAttributePair textPropertyBinding  = PropertyBinder.GetPropertyBinding(context, XName.Get("__self", element.Name.NamespaceName), false);
            AstXNameBindingAttribute     textBindingAttribute = textPropertyBinding == null ? null : textPropertyBinding.BindingAttribute;

            if (textBindingAttribute != null && textBindingAttribute.IsSelf)
            {
                ParseChildXObject(context, element.LastNode, element.Value, textPropertyBinding.Property);
            }
        }