Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
NullCheckTernaryOperator.cs
1using System;
2
3namespace Waher.Script.Model
4{
9 {
13 protected readonly bool nullCheck;
14
25 public NullCheckTernaryOperator(ScriptNode Left, ScriptNode Middle, ScriptNode Right, bool NullCheck, int Start, int Length, Expression Expression)
26 : base(Left, Middle, Right, Start, Length, Expression)
27 {
28 this.nullCheck = NullCheck;
29 }
30
32 public override bool Equals(object obj)
33 {
34 return obj is NullCheckTernaryOperator O &&
35 this.nullCheck.Equals(O.nullCheck) &&
36 base.Equals(obj);
37 }
38
40 public override int GetHashCode()
41 {
42 int Result = base.GetHashCode();
43 Result ^= Result << 5 ^ this.nullCheck.GetHashCode();
44 return Result;
45 }
46
47 }
48}
Class managing a script expression.
Definition: Expression.cs:39
Base class for all unary operators performing operand null checks.
readonly bool nullCheck
If null should be returned if operand is null.
NullCheckTernaryOperator(ScriptNode Left, ScriptNode Middle, ScriptNode Right, bool NullCheck, int Start, int Length, Expression Expression)
Base class for all unary operators performing operand null checks.
Base class for all nodes in a parsed script tree.
Definition: ScriptNode.cs:69
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
Base class for all ternary operators.