Exemplo n.º 1
0
 public static XPath2NodeIterator Create(object value)
 {
     if (value == Undefined.Value)
         return EmptyIterator.Shared;
     XPath2NodeIterator iter = value as XPath2NodeIterator;
     if (iter != null)
         return iter.Clone();
     XPathItem item = value as XPathItem;
     if (item == null)
         item = new XPath2Item(value);
     return new SingleIterator(item);
 }
Exemplo n.º 2
0
        public static XPath2NodeIterator Create(object value)
        {
            if (value == Undefined.Value)
            {
                return EmptyIterator.Shared;
            }

            if (value is XPath2NodeIterator iter)
            {
                return iter.Clone();
            }

            if (!(value is XPathItem item))
            {
                item = new XPath2Item(value);
            }

            return new SingleIterator(item);
        }
Exemplo n.º 3
0
        public static XPath2NodeIterator Create(object value)
        {
            if (value == Undefined.Value)
            {
                return(EmptyIterator.Shared);
            }
            XPath2NodeIterator iter = value as XPath2NodeIterator;

            if (iter != null)
            {
                return(iter.Clone());
            }
            XPathItem item = value as XPathItem;

            if (item == null)
            {
                item = new XPath2Item(value);
            }
            return(new SingleIterator(item));
        }