150 references to Op
System.Private.Xml (150)
System\Xml\XPath\Internal\BooleanExpr.cs (4)
17public BooleanExpr(Operator.Op op, Query opnd1, Query opnd2) 19Debug.Assert(op == Operator.Op.AND || op == Operator.Op.OR); 31_isOr = (op == Operator.Op.OR);
System\Xml\XPath\Internal\LogicalExpr.cs (65)
13private readonly Operator.Op _op; 17public LogicalExpr(Operator.Op op, Query opnd1, Query opnd2) 20Operator.Op.LT == op || Operator.Op.GT == op || 21Operator.Op.LE == op || Operator.Op.GE == op || 22Operator.Op.EQ == op || Operator.Op.NE == op 43Operator.Op op = _op; 61if (op == Operator.Op.EQ || op == Operator.Op.NE) 74private delegate bool cmpXslt(Operator.Op op, object val1, object val2); 95private static bool cmpQueryQueryE(Operator.Op op, object val1, object val2) 97Debug.Assert(op == Operator.Op.EQ || op == Operator.Op.NE); 98bool isEQ = (op == Operator.Op.EQ); 128private static bool cmpQueryQueryO(Operator.Op op, object val1, object val2) 131op == Operator.Op.LT || op == Operator.Op.GT || 132op == Operator.Op.LE || op == Operator.Op.GE 161private static bool cmpQueryNumber(Operator.Op op, object val1, object val2) 176private static bool cmpQueryStringE(Operator.Op op, object val1, object val2) 191private static bool cmpQueryStringO(Operator.Op op, object val1, object val2) 206private static bool cmpRtfQueryE(Operator.Op op, object val1, object val2) 221private static bool cmpRtfQueryO(Operator.Op op, object val1, object val2) 236private static bool cmpQueryBoolE(Operator.Op op, object val1, object val2) 244private static bool cmpQueryBoolO(Operator.Op op, object val1, object val2) 252private static bool cmpBoolBoolE(Operator.Op op, bool n1, bool n2) 254Debug.Assert(op == Operator.Op.EQ || op == Operator.Op.NE, 257return (op == Operator.Op.EQ) == (n1 == n2); 259private static bool cmpBoolBoolE(Operator.Op op, object val1, object val2) 266private static bool cmpBoolBoolO(Operator.Op op, object val1, object val2) 273private static bool cmpBoolNumberE(Operator.Op op, object val1, object val2) 280private static bool cmpBoolNumberO(Operator.Op op, object val1, object val2) 287private static bool cmpBoolStringE(Operator.Op op, object val1, object val2) 294private static bool cmpRtfBoolE(Operator.Op op, object val1, object val2) 301private static bool cmpBoolStringO(Operator.Op op, object val1, object val2) 309private static bool cmpRtfBoolO(Operator.Op op, object val1, object val2) 317private static bool cmpNumberNumber(Operator.Op op, double n1, double n2) 321case Operator.Op.LT: return (n1 < n2); 322case Operator.Op.GT: return (n1 > n2); 323case Operator.Op.LE: return (n1 <= n2); 324case Operator.Op.GE: return (n1 >= n2); 325case Operator.Op.EQ: return (n1 == n2); 326case Operator.Op.NE: return (n1 != n2); 331private static bool cmpNumberNumberO(Operator.Op op, double n1, double n2) 335case Operator.Op.LT: return (n1 < n2); 336case Operator.Op.GT: return (n1 > n2); 337case Operator.Op.LE: return (n1 <= n2); 338case Operator.Op.GE: return (n1 >= n2); 343private static bool cmpNumberNumber(Operator.Op op, object val1, object val2) 350private static bool cmpStringNumber(Operator.Op op, object val1, object val2) 357private static bool cmpRtfNumber(Operator.Op op, object val1, object val2) 364private static bool cmpStringStringE(Operator.Op op, string n1, string n2) 366Debug.Assert(op == Operator.Op.EQ || op == Operator.Op.NE, 369return (op == Operator.Op.EQ) == (n1 == n2); 371private static bool cmpStringStringE(Operator.Op op, object val1, object val2) 377private static bool cmpRtfStringE(Operator.Op op, object val1, object val2) 383private static bool cmpRtfRtfE(Operator.Op op, object val1, object val2) 390private static bool cmpStringStringO(Operator.Op op, object val1, object val2) 397private static bool cmpRtfStringO(Operator.Op op, object val1, object val2) 404private static bool cmpRtfRtfO(Operator.Op op, object val1, object val2)
System\Xml\XPath\Internal\NumericExpr.cs (18)
13private readonly Operator.Op _op; 17public NumericExpr(Operator.Op op, Query opnd1, Query opnd2) 20op == Operator.Op.PLUS || op == Operator.Op.MINUS || 21op == Operator.Op.MUL || op == Operator.Op.DIV || 22op == Operator.Op.MOD 57private static double GetValue(Operator.Op op, double n1, double n2) 59Debug.Assert(op == Operator.Op.PLUS || op == Operator.Op.MINUS || op == Operator.Op.MOD || op == Operator.Op.DIV || op == Operator.Op.MUL); 62Operator.Op.PLUS => n1 + n2, 63Operator.Op.MINUS => n1 - n2, 64Operator.Op.MOD => n1 % n2, 65Operator.Op.DIV => n1 / n2, 66Operator.Op.MUL => n1 * n2,
System\Xml\XPath\Internal\Operator.cs (19)
35private static readonly Op[] s_invertOp = { 36/*INVALID*/ Op.INVALID, 37/*OR */ Op.INVALID, 38/*END */ Op.INVALID, 39/*EQ */ Op.EQ, 40/*NE */ Op.NE, 41/*LT */ Op.GT, 42/*LE */ Op.GE, 43/*GT */ Op.LT, 44/*GE */ Op.LE, 47public static Operator.Op InvertOperator(Operator.Op op) 49Debug.Assert(Op.EQ <= op && op <= Op.GE); 53private readonly Op _opType; 57public Operator(Op op, AstNode opnd1, AstNode opnd2) 69if (_opType <= Op.GE) 73if (_opType <= Op.MOD) 81public Op OperatorType { get { return _opType; } }
System\Xml\XPath\Internal\QueryBuilder.cs (16)
261prevCond = new LogicalExpr(Operator.Op.EQ, new NodeFunctions(FT.FuncPosition, null), prevCond); 263cond = new BooleanExpr(Operator.Op.AND, prevCond, cond); 316case Operator.Op.PLUS: 317case Operator.Op.MINUS: 318case Operator.Op.MUL: 319case Operator.Op.MOD: 320case Operator.Op.DIV: 322case Operator.Op.LT: 323case Operator.Op.GT: 324case Operator.Op.LE: 325case Operator.Op.GE: 326case Operator.Op.EQ: 327case Operator.Op.NE: 329case Operator.Op.OR: 330case Operator.Op.AND: 332case Operator.Op.UNION:
System\Xml\XPath\Internal\XPathParser.cs (28)
76opnd = new Operator(Operator.Op.OR, opnd, ParseAndExpr(qyInput)); 92opnd = new Operator(Operator.Op.AND, opnd, ParseEqualityExpr(qyInput)); 104Operator.Op op = ( 105_scanner.Kind == XPathScanner.LexKind.Eq ? Operator.Op.EQ : 106_scanner.Kind == XPathScanner.LexKind.Ne ? Operator.Op.NE : 107/*default :*/ Operator.Op.INVALID 109if (op == Operator.Op.INVALID) 126Operator.Op op = ( 127_scanner.Kind == XPathScanner.LexKind.Lt ? Operator.Op.LT : 128_scanner.Kind == XPathScanner.LexKind.Le ? Operator.Op.LE : 129_scanner.Kind == XPathScanner.LexKind.Gt ? Operator.Op.GT : 130_scanner.Kind == XPathScanner.LexKind.Ge ? Operator.Op.GE : 131/*default :*/ Operator.Op.INVALID 133if (op == Operator.Op.INVALID) 150Operator.Op op = ( 151_scanner.Kind == XPathScanner.LexKind.Plus ? Operator.Op.PLUS : 152_scanner.Kind == XPathScanner.LexKind.Minus ? Operator.Op.MINUS : 153/*default :*/ Operator.Op.INVALID 155if (op == Operator.Op.INVALID) 172Operator.Op op = ( 173_scanner.Kind == XPathScanner.LexKind.Star ? Operator.Op.MUL : 174TestOp("div") ? Operator.Op.DIV : 175TestOp("mod") ? Operator.Op.MOD : 176/*default :*/ Operator.Op.INVALID 178if (op == Operator.Op.INVALID) 199return new Operator(Operator.Op.MUL, ParseUnionExpr(qyInput), new Operand(-1)); 222opnd = new Operator(Operator.Op.UNION, opnd, opnd2); 604opnd = new Operator(Operator.Op.UNION, opnd, ParseLocationPathPattern());