Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
NotLike.cs
1using System.Collections.Generic;
5
7{
11 public class NotLike : Like
12 {
22 : base(Left, Right, Start, Length, Expression)
23 {
24 }
25
34 {
35 IElement Result = base.EvaluateScalar(Left, Right, Variables);
36 BooleanValue B = (BooleanValue)Result;
37 if (B.Value)
38 return BooleanValue.False;
39 else
40 return BooleanValue.True;
41 }
42
49 public override PatternMatchResult PatternMatch(IElement CheckAgainst, Dictionary<string, IElement> AlreadyFound)
50 {
51 switch (base.PatternMatch(CheckAgainst, AlreadyFound))
52 {
53 case PatternMatchResult.Match:
54 return PatternMatchResult.NoMatch;
55
56 case PatternMatchResult.NoMatch:
57 return PatternMatchResult.Match;
58
59 case PatternMatchResult.Unknown:
60 default:
61 return PatternMatchResult.Unknown;
62 }
63 }
64 }
65}
Class managing a script expression.
Definition: Expression.cs:39
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 BooleanValue True
Constant true value.
override PatternMatchResult PatternMatch(IElement CheckAgainst, Dictionary< string, IElement > AlreadyFound)
Performs a pattern match operation.
Definition: NotLike.cs:49
NotLike(ScriptNode Left, ScriptNode Right, int Start, int Length, Expression Expression)
Not Like
Definition: NotLike.cs:21
override IElement EvaluateScalar(IElement Left, IElement Right, Variables Variables)
Evaluates the operator on scalar operands.
Definition: NotLike.cs:33
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:20
PatternMatchResult
Status result of a pattern matching operation.
Definition: ScriptNode.cs:17