public XPathQuery Clone() {
     XPathQuery clone = new XPathQuery();
     clone.xpath = xpath;
     clone.compiledXPath = compiledXPath;
     clone.depthLookup = depthLookup;
     clone.treeDepth = treeDepth;
     return clone;
 }
Esempio n. 2
0
        /// <include file='doc\XPathReader.uex' path='docs/doc[@for="XPathReader.XPathReader1"]/*' />
        /// <internalonly/>
        /// <devdoc>
        ///    <para>return true when the </para>
        /// </devdoc>
        public bool Match(XPathQuery xpathExpr)
        {
            if (xpathCollection.Contains(xpathExpr) && xpathExpr.Match())
            {
                return(true);
            }

            return(false);
        }
Esempio n. 3
0
        public XPathQuery Clone()
        {
            XPathQuery clone = new XPathQuery();

            clone.xpath         = xpath;
            clone.compiledXPath = compiledXPath;
            clone.depthLookup   = depthLookup;
            clone.treeDepth     = treeDepth;
            return(clone);
        }
Esempio n. 4
0
        public int Add(string xpath)
        {
            XPathQuery xpathexpr;

            if (reader != null)
            {
                xpathexpr = new XPathQuery(xpath, reader.Depth);
                if (reader.ReadState == ReadState.Interactive)
                {
                    xpathexpr.Advance(this.reader);
                }
            }
            else
            {
                xpathexpr = new XPathQuery(xpath);
            }

            xpathexpr.Key = key;

            xpathes.Add(key++, xpathexpr);

            return(key - 1);
        }
 public void Remove(XPathQuery xpathexpr) {
     xpathes.Remove(xpathexpr.Key);
 }
 public int Add(XPathQuery xpathexpr) {
     xpathexpr.Key = key;
     xpathes.Add(key++, xpathexpr);
     return (key - 1);
 }
        public int Add(string xpath) {
            XPathQuery xpathexpr;

            if (reader != null) {
                xpathexpr = new XPathQuery(xpath, reader.Depth);
                if (reader.ReadState == ReadState.Interactive) {
                    xpathexpr.Advance(this.reader);
                }
            }
            else {
                xpathexpr = new XPathQuery(xpath);
            }

            xpathexpr.Key = key;

            xpathes.Add(key++, xpathexpr);

            return (key - 1);
        }
 //
 // check if a expression contains in the collection
 //
 public bool Contains(XPathQuery expr) {
     return xpathes.ContainsValue(expr);
 }
Esempio n. 9
0
 public void Remove(XPathQuery xpathexpr)
 {
     xpathes.Remove(xpathexpr.Key);
 }
Esempio n. 10
0
 public int Add(XPathQuery xpathexpr)
 {
     xpathexpr.Key = key;
     xpathes.Add(key++, xpathexpr);
     return(key - 1);
 }
Esempio n. 11
0
 //
 // check if a expression contains in the collection
 //
 public bool Contains(XPathQuery expr)
 {
     return(xpathes.ContainsValue(expr));
 }
Esempio n. 12
0
        /// <include file='doc\XPathReader.uex' path='docs/doc[@for="XPathReader.XPathReader1"]/*' />
        /// <internalonly/>
        /// <devdoc>
        ///    <para>return true when the </para>
        /// </devdoc>
        public bool Match(XPathQuery xpathExpr) {

            if (xpathCollection.Contains(xpathExpr) && xpathExpr.Match()) {
                return true;
            }

            return false;
        }