Example #1
0
 internal override void reset()
 {
     if (_ResultQuery != null)
     {
         _ResultQuery.reset();
     }
 }
 internal override void reset()
 {
     if (_qy != null)
     {
         _qy.reset();
     }
 }
Example #3
0
 internal override void reset()
 {
     if (_VarQuery != null)
     {
         _VarQuery.reset();
     }
 }
Example #4
0
 internal override void reset()
 {
     _Results.Clear();
     _ResultCount = 0;
     _advance     = 0;
     _qyInput.reset();
 }
Example #5
0
 internal override void reset()
 {
     _getInput1   = true;
     _fillList    = true;
     _elementList = null;
     _child.reset();
     base.reset();
 }
Example #6
0
 internal override void reset()
 {
     _opnd1.reset();
     if (_opnd2 != null)
     {
         _opnd2.reset();
     }
 }
Example #7
0
 internal override void reset()
 {
     last = -1;
     if (_Opnd != null)
     {
         _Opnd.reset();
     }
 }
Example #8
0
 internal override void reset()
 {
     qy1.reset();
     qy2.reset();
     advance1 = true;
     advance2 = true;
     _last    = null;
     base.reset();
 }
Example #9
0
 internal override void reset()
 {
     // reset the state
     _position = 0;
     m_eNext   = null;
     if (m_qyInput != null)
     {
         m_qyInput.reset();
     }
 }
Example #10
0
        /// <include file='doc\XPathNavigator.uex' path='docs/doc[@for="XPathNavigator.Evaluate1"]/*' />
        public virtual object Evaluate(XPathExpression expr, XPathNodeIterator context)
        {
            CompiledXpathExpr cexpr = expr as CompiledXpathExpr;

            if (cexpr == null)
            {
                throw new XPathException(Res.Xp_BadQueryObject);
            }
            IQuery query = cexpr.QueryTree;

            query.reset();

            XPathNavigator current = (context != null) ? context.Current : this;

            if (query.ReturnType() == XPathResultType.NodeSet)
            {
                return(new XPathSelectionIterator(current, expr));
            }
            return(query.getValue(current, context));
        }
Example #11
0
 internal override void reset()
 {
     this.results.Clear();
     _advance = 0;
     _qyInput.reset();
 }
 public override void Reset()
 {
     query.reset();
 }
Example #13
0
 internal override void reset()
 {
     _opnd.reset();
     base.reset();
 }
Example #14
0
        static bool compareQueryQuery2(
                                      IQuery opnd1,
                                      IQuery opnd2,
                                      IQuery qyContext,
                                      Operator.Op op) {
            XPathNavigator val1, val2;
            double n1,n2;   
            opnd1.setContext(qyContext.peekElement().Clone()); 
            opnd2.setContext(qyContext.peekElement().Clone());
            while (true) {
                val1 = opnd1.advance();
                if (val1 != null)
                    n1 = NumberFunctions.Number(val1.Value);
                else
                    return false;
                val2 = opnd2.advance();

                if (val2 != null)
                    n2 = NumberFunctions.Number(val2.Value);
                else
                    return false;
                while (true) {

                    switch (op) {
                        case Operator.Op.LT : if (n1 < n2) return true;
                            break;
                        case Operator.Op.GT : if (n1 > n2) return true;
                            break;
                        case Operator.Op.LE : if (n1 <= n2) return true;
                            break;
                        case Operator.Op.GE : if (n1 >= n2) return true;
                            break;
                        case Operator.Op.EQ : if (n1 == n2) return true;
                            break;
		        case Operator.Op.NE : if (n1 != n2) return true;
			    break;
                    }
                    val2 = opnd2.advance();
                    if (val2 != null)
                        n2 = NumberFunctions.Number(val2.Value);
                    else {
                        opnd2.reset();    
                        break;
                    }

                }
            }

        }
Example #15
0
        static bool compareQueryQuery1(
                                      IQuery opnd1,
                                      IQuery opnd2,
                                      IQuery qyContext,
                                      Operator.Op op) {
            XPathNavigator val1, val2; 
            String str1,str2;  
            opnd1.setContext(qyContext.peekElement().Clone()); 
            opnd2.setContext(qyContext.peekElement().Clone());
            while (true) {
                val1 = opnd1.advance();
                if (val1 != null)
                    str1 = val1.Value;
                else
                    return false;

                val2 = opnd2.advance();

                if (val2 != null)
                    str2 = val2.Value;
                else
                    return false;

                while (true) {
                    switch (op) {
                        case Operator.Op.EQ :
                            if (str1 == str2)
                                return true;
                            break;
                        case Operator.Op.NE :
                            if (str1 != str2)
                                return true;
			                break;
                    }
                    val2 = opnd2.advance();
                    if (val2 != null)
                        str2 = val2.Value;
                    else {
                        opnd2.reset();    
                        break;
                    }           
                }
            }
        }