Ejemplo n.º 1
0
        /// <summary>
        /// If "seq" is non-null, then clear it and reuse it.  Otherwise, create a new XmlQueryItemSequence.
        /// </summary>
        public static XmlQueryItemSequence CreateOrReuse(XmlQueryItemSequence seq)
        {
            if (seq != null)
            {
                seq.Clear();
                return(seq);
            }

            return(new XmlQueryItemSequence());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// If "seq" is non-null, then clear it and reuse it.  Otherwise, create a new XmlQueryItemSequence.
        /// Add "item" to the sequence.
        /// </summary>
        public static XmlQueryItemSequence CreateOrReuse(XmlQueryItemSequence seq, XPathItem item)
        {
            if (seq != null)
            {
                seq.Clear();
                seq.Add(item);
                return(seq);
            }

            return(new XmlQueryItemSequence(item));
        }