Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Operator.cs
Go to the documentation of this file.
1
using
System.Xml.XPath
;
2
3
namespace
MS.Internal.Xml.XPath
;
4
5
internal
sealed
class
Operator
:
AstNode
6
{
7
public
enum
Op
8
{
9
INVALID
,
10
OR
,
11
AND
,
12
EQ
,
13
NE
,
14
LT
,
15
LE
,
16
GT
,
17
GE
,
18
PLUS
,
19
MINUS
,
20
MUL
,
21
DIV
,
22
MOD
,
23
UNION
24
}
25
26
private
static
readonly
Op
[]
s_invertOp
=
new
Op
[9]
27
{
28
Op
.INVALID,
29
Op
.INVALID,
30
Op
.INVALID,
31
Op
.EQ,
32
Op
.NE,
33
Op
.GT,
34
Op
.GE,
35
Op
.LT,
36
Op.LE
37
};
38
39
private
readonly
Op
_opType
;
40
41
private
readonly
AstNode
_opnd1
;
42
43
private
readonly
AstNode
_opnd2
;
44
45
public
override
AstType
Type
=>
AstType
.Operator;
46
47
public
override
XPathResultType
ReturnType
48
{
49
get
50
{
51
if
(
_opType
<=
Op
.GE)
52
{
53
return
XPathResultType
.Boolean;
54
}
55
if
(
_opType
<=
Op
.MOD)
56
{
57
return
XPathResultType
.Number;
58
}
59
return
XPathResultType
.NodeSet;
60
}
61
}
62
63
public
Op
OperatorType
=>
_opType
;
64
65
public
AstNode
Operand1
=>
_opnd1
;
66
67
public
AstNode
Operand2
=>
_opnd2
;
68
69
public
static
Op
InvertOperator
(
Op
op)
70
{
71
return
s_invertOp
[(int)op];
72
}
73
74
public
Operator
(
Op
op,
AstNode
opnd1,
AstNode
opnd2)
75
{
76
_opType
= op;
77
_opnd1
= opnd1;
78
_opnd2
= opnd2;
79
}
80
}
MS.Internal.Xml.XPath.AstNode.AstType
AstType
Definition
AstNode.cs:8
MS.Internal.Xml.XPath.AstNode
Definition
AstNode.cs:6
MS.Internal.Xml.XPath.Operator.InvertOperator
static Op InvertOperator(Op op)
Definition
Operator.cs:69
MS.Internal.Xml.XPath.Operator.Operand1
AstNode Operand1
Definition
Operator.cs:65
MS.Internal.Xml.XPath.Operator.Operand2
AstNode Operand2
Definition
Operator.cs:67
MS.Internal.Xml.XPath.Operator.OperatorType
Op OperatorType
Definition
Operator.cs:63
MS.Internal.Xml.XPath.Operator.s_invertOp
static readonly Op[] s_invertOp
Definition
Operator.cs:26
MS.Internal.Xml.XPath.Operator._opType
readonly Op _opType
Definition
Operator.cs:39
MS.Internal.Xml.XPath.Operator.Operator
Operator(Op op, AstNode opnd1, AstNode opnd2)
Definition
Operator.cs:74
MS.Internal.Xml.XPath.Operator.ReturnType
override XPathResultType ReturnType
Definition
Operator.cs:48
MS.Internal.Xml.XPath.Operator._opnd2
readonly AstNode _opnd2
Definition
Operator.cs:43
MS.Internal.Xml.XPath.Operator._opnd1
readonly AstNode _opnd1
Definition
Operator.cs:41
MS.Internal.Xml.XPath.Operator.Op
Op
Definition
Operator.cs:8
MS.Internal.Xml.XPath.Operator.Op.OR
@ OR
MS.Internal.Xml.XPath.Operator.Op.DIV
@ DIV
MS.Internal.Xml.XPath.Operator.Op.MUL
@ MUL
MS.Internal.Xml.XPath.Operator.Op.EQ
@ EQ
MS.Internal.Xml.XPath.Operator.Op.AND
@ AND
MS.Internal.Xml.XPath.Operator.Op.PLUS
@ PLUS
MS.Internal.Xml.XPath.Operator.Op.LT
@ LT
MS.Internal.Xml.XPath.Operator.Op.MOD
@ MOD
MS.Internal.Xml.XPath.Operator.Op.INVALID
@ INVALID
MS.Internal.Xml.XPath.Operator.Op.GT
@ GT
MS.Internal.Xml.XPath.Operator.Op.LE
@ LE
MS.Internal.Xml.XPath.Operator.Op.NE
@ NE
MS.Internal.Xml.XPath.Operator.Op.UNION
@ UNION
MS.Internal.Xml.XPath.Operator.Op.GE
@ GE
MS.Internal.Xml.XPath.Operator.Op.MINUS
@ MINUS
MS.Internal.Xml.XPath.Operator
Definition
Operator.cs:6
System.Type
Definition
Type.cs:14
MS.Internal.Xml.XPath
Definition
AbsoluteQuery.cs:3
System.Xml.XPath.XPathResultType
XPathResultType
Definition
XPathResultType.cs:4
System.Xml.XPath
Definition
Extensions.cs:5
source
System.Private.Xml
MS.Internal.Xml.XPath
Operator.cs
Generated by
1.10.0