public PropertyBindingAttributePair(PropertyInfo Property, AstXNameBindingAttribute BindingAttribute) { this.Property = Property; this.BindingAttribute = BindingAttribute; }
private void BindXPathQuery(AstNode parentASTNode, XElement xElement, PropertyBindingAttributePair propertyBinding, AstXNameBindingAttribute BindingAttribute, XmlIRDocumentType docType) { object EvaluationResult = xElement.XPathEvaluate(BindingAttribute.XPathQuery); if (IsContainerOf(typeof(IEnumerable<object>), EvaluationResult.GetType())) { foreach (object child in (IEnumerable<object>)EvaluationResult) { XAttribute childAttribute = child as XAttribute; XElement childElement = child as XElement; XText childText = child as XText; if (childAttribute != null) { ParseChildXObject(parentASTNode, childAttribute, childAttribute.Name, childAttribute.Value, propertyBinding.Property, docType); } else if (childElement != null) { ParseChildXObject(parentASTNode, childElement, childElement.Name, childElement.Value, propertyBinding.Property, docType); } else if (childText != null) { ParseChildXObject(parentASTNode, childText, null, childText.Value, propertyBinding.Property, docType); } } } else { XAttribute xResult = new XAttribute(XName.Get("XPathEvaluationResult", this._DefaultXmlNamespace), EvaluationResult); ParseChildXObject(parentASTNode, xResult, xResult.Name, xResult.Value, propertyBinding.Property, docType); } }