public XPathQuery Clone() {
     XPathQuery clone = new XPathQuery();
     clone.xpath = xpath;
     clone.compiledXPath = compiledXPath;
     clone.depthLookup = depthLookup;
     clone.treeDepth = treeDepth;
     return clone;
 }
Beispiel #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);
        }
Beispiel #3
0
        public XPathQuery Clone()
        {
            XPathQuery clone = new XPathQuery();

            clone.xpath         = xpath;
            clone.compiledXPath = compiledXPath;
            clone.depthLookup   = depthLookup;
            clone.treeDepth     = treeDepth;
            return(clone);
        }
Beispiel #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);
 }
Beispiel #9
0
 public void Remove(XPathQuery xpathexpr)
 {
     xpathes.Remove(xpathexpr.Key);
 }
Beispiel #10
0
 public int Add(XPathQuery xpathexpr)
 {
     xpathexpr.Key = key;
     xpathes.Add(key++, xpathexpr);
     return(key - 1);
 }
Beispiel #11
0
 //
 // check if a expression contains in the collection
 //
 public bool Contains(XPathQuery expr)
 {
     return(xpathes.ContainsValue(expr));
 }
        /// <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;
        }