Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Equivalence.cs
1using System;
2using System.Runtime.ExceptionServices;
6
8{
13 {
23 : base(Left, Right, Start, Length, Expression)
24 {
25 }
26
33 public override IElement EvaluateOptimizedResult(bool Left)
34 {
35 return null;
36 }
37
44 public override IElement Evaluate(bool Left, bool Right)
45 {
46 return Left == Right ? BooleanValue.True : BooleanValue.False;
47 }
48
55 public override IElement Evaluate(Exception Left, bool Right)
56 {
57 ExceptionDispatchInfo.Capture(Left).Throw();
58 return ObjectValue.Null;
59 }
60
67 public override IElement Evaluate(bool Left, Exception Right)
68 {
69 ExceptionDispatchInfo.Capture(Right).Throw();
70 return ObjectValue.Null;
71 }
72
79 public override IElement Evaluate(Exception Left, Exception Right)
80 {
81 ExceptionDispatchInfo.Capture(Left).Throw();
82 return ObjectValue.Null;
83 }
84
85 }
86}
Class managing a script expression.
Definition: Expression.cs:39
Base class for binary boolean operators.
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
Boolean-valued number.
Definition: BooleanValue.cs:12
static readonly BooleanValue False
Constant false value.
static readonly ObjectValue Null
Null value.
Definition: ObjectValue.cs:86
override IElement EvaluateOptimizedResult(bool Left)
Gives the operator a chance to optimize its execution if it knows the value of the left operand....
Definition: Equivalence.cs:33
override IElement Evaluate(bool Left, bool Right)
Evaluates the boolean operator.
Definition: Equivalence.cs:44
override IElement Evaluate(Exception Left, Exception Right)
Evaluates the boolean operator.
Definition: Equivalence.cs:79
override IElement Evaluate(bool Left, Exception Right)
Evaluates the boolean operator.
Definition: Equivalence.cs:67
override IElement Evaluate(Exception Left, bool Right)
Evaluates the boolean operator.
Definition: Equivalence.cs:55
Equivalence(ScriptNode Left, ScriptNode Right, int Start, int Length, Expression Expression)
Equivalence.
Definition: Equivalence.cs:22
Basic interface for all types of elements.
Definition: IElement.cs:20