Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Wildcard.cs
1using System;
2using System.Threading.Tasks;
7
9{
13 public class Wildcard : ScriptLeafNode
14 {
22 : base(Start, Length, Expression)
23 {
24 }
25
32 {
33 if (Variables is ObjectProperties Properties && Properties.Object is GroupObject GroupObject)
35 else
36 throw new ScriptRuntimeException("Invalid context.", this);
37 }
38
44 public override Task<IElement> EvaluateAsync(Variables Variables)
45 {
46 return Task.FromResult<IElement>(this.Evaluate(Variables));
47 }
48
50 public override bool Equals(object obj)
51 {
52 return obj is Wildcard;
53 }
54
56 public override int GetHashCode()
57 {
58 return "*".GetHashCode();
59 }
60
61 }
62}
Class managing a script expression.
Definition: Expression.cs:39
static IElement Encapsulate(object Value)
Encapsulates an object.
Definition: Expression.cs:4955
Base class for leaf nodes in a parsed script tree.
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
Represents a collection of objects grouped together useing a GROUP BY construct.
Definition: GroupObject.cs:13
Represents the Wildcard symbol *
Definition: Wildcard.cs:14
override bool Equals(object obj)
Definition: Wildcard.cs:50
Wildcard(int Start, int Length, Expression Expression)
Represents the Wildcard symbol *
Definition: Wildcard.cs:21
override Task< IElement > EvaluateAsync(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
Definition: Wildcard.cs:44
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection.
Definition: Wildcard.cs:31
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:20