Exemplo n.º 1
0
        public static string Eval(object container, string xPath, string format, IXmlNamespaceResolver resolver)
        {
            object value = XPathBinder.Eval(container, xPath, resolver);

            if (value == null)
            {
                return(String.Empty);
            }
            else
            {
                if (String.IsNullOrEmpty(format))
                {
                    return(value.ToString());
                }
                else
                {
                    return(String.Format(format, value));
                }
            }
        }
Exemplo n.º 2
0
 protected internal IEnumerable XPathSelect(string xPathExpression, IXmlNamespaceResolver resolver)
 {
     this.CheckPageExists();
     return(XPathBinder.Select(this.Page.GetDataItem(), xPathExpression, resolver));
 }
Exemplo n.º 3
0
 protected internal IEnumerable XPathSelect(string xPathExpression)
 {
     this.CheckPageExists();
     return(XPathBinder.Select(this.Page.GetDataItem(), xPathExpression));
 }
Exemplo n.º 4
0
 protected internal string XPath(string xPathExpression, string format, IXmlNamespaceResolver resolver)
 {
     this.CheckPageExists();
     return(XPathBinder.Eval(this.Page.GetDataItem(), xPathExpression, format, resolver));
 }
Exemplo n.º 5
0
 protected internal string XPath(string xPathExpression, string format)
 {
     this.CheckPageExists();
     return(XPathBinder.Eval(this.Page.GetDataItem(), xPathExpression, format));
 }
Exemplo n.º 6
0
 protected internal object XPath(string xPathExpression)
 {
     this.CheckPageExists();
     return(XPathBinder.Eval(this.Page.GetDataItem(), xPathExpression));
 }
Exemplo n.º 7
0
 protected internal IEnumerable XPathSelect(string xpathexpression, IXmlNamespaceResolver resolver)
 {
     return(XPathBinder.Select(Page.GetDataItem(), xpathexpression, resolver));
 }
Exemplo n.º 8
0
 protected internal IEnumerable XPathSelect(string xpathexpression)
 {
     return(XPathBinder.Select(Page.GetDataItem(), xpathexpression));
 }
Exemplo n.º 9
0
 protected internal string XPath(string xpathexpression, string format, IXmlNamespaceResolver resolver)
 {
     return(XPathBinder.Eval(Page.GetDataItem(), xpathexpression, format, resolver));
 }
Exemplo n.º 10
0
 protected internal string XPath(string xpathexpression, string format)
 {
     return(XPathBinder.Eval(Page.GetDataItem(), xpathexpression, format));
 }
Exemplo n.º 11
0
 protected internal object XPath(string xpathexpression, IXmlNamespaceResolver resolver)
 {
     return(XPathBinder.Eval(Page.GetDataItem(), xpathexpression, null, resolver));
 }
Exemplo n.º 12
0
 protected internal object XPath(string xpathexpression)
 {
     return(XPathBinder.Eval(Page.GetDataItem(), xpathexpression));
 }
Exemplo n.º 13
0
 /// <devdoc>
 /// Simplified databinding XPath() method. This method uses the current data item and a namespace resolver
 /// to evaluate an XPath expression using XPathBinder.Eval().
 /// The data item is retrieved using either the IDataItemContainer interface or by looking for a property called 'DataItem'.
 /// If the data item is not found, an exception is thrown.
 /// </devdoc>
 protected internal object XPath(string xPathExpression, IXmlNamespaceResolver resolver)
 {
     CheckPageExists();
     return(XPathBinder.Eval(Page.GetDataItem(), xPathExpression, resolver));
 }