![]() |
Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
|
Gets the current exchange rate between two currencies. Requires a currency converter to be configured for the system. More...
Public Member Functions | |
ExchangeRate (ScriptNode From, ScriptNode To, int Start, int Length, Expression Expression) | |
Gets the current exchange rate between two currencies. Requires a currency converter to be configured for the system. More... | |
override IElement | EvaluateScalar (string Argument1, string Argument2, Variables Variables) |
Evaluates the function on two scalar arguments. More... | |
override async Task< IElement > | EvaluateScalarAsync (string Argument1, string Argument2, Variables Variables) |
Evaluates the function on two scalar arguments. More... | |
override IElement | Evaluate (IElement Argument1, IElement Argument2, Variables Variables) |
Evaluates the function. More... | |
override IElement | Evaluate (Variables Variables) |
Evaluates the node, using the variables provided in the Variables collection. More... | |
virtual IElement | EvaluateScalar (IElement Argument1, IElement Argument2, Variables Variables) |
Evaluates the function on two scalar arguments. More... | |
virtual IElement | EvaluateScalar (double Argument1, double Argument2, Variables Variables) |
Evaluates the function on two scalar arguments. More... | |
virtual IElement | EvaluateScalar (Complex Argument1, Complex Argument2, Variables Variables) |
Evaluates the function on two scalar arguments. More... | |
virtual IElement | EvaluateScalar (bool Argument1, bool Argument2, Variables Variables) |
Evaluates the function on two scalar arguments. More... | |
override async Task< IElement > | EvaluateAsync (IElement Argument1, IElement Argument2, Variables Variables) |
Evaluates the function. More... | |
override async Task< IElement > | EvaluateAsync (Variables Variables) |
Evaluates the node, using the variables provided in the Variables collection. More... | |
virtual Task< IElement > | EvaluateScalarAsync (IElement Argument1, IElement Argument2, Variables Variables) |
Evaluates the function on two scalar arguments. More... | |
virtual Task< IElement > | EvaluateScalarAsync (double Argument1, double Argument2, Variables Variables) |
Evaluates the function on two scalar arguments. More... | |
virtual Task< IElement > | EvaluateScalarAsync (Complex Argument1, Complex Argument2, Variables Variables) |
Evaluates the function on two scalar arguments. More... | |
virtual Task< IElement > | EvaluateScalarAsync (bool Argument1, bool Argument2, Variables Variables) |
Evaluates the function on two scalar arguments. More... | |
override bool | ForAllChildNodes (ScriptNodeEventHandler Callback, object State, SearchMethod Order) |
Calls the callback method for all child nodes. More... | |
bool | ForAllChildNodes (ScriptNodeEventHandler Callback, object State, bool DepthFirst) |
Calls the callback method for all child nodes. More... | |
override bool | Equals (object obj) |
override int | GetHashCode () |
void | SetParent (ScriptNode Parent) |
Sets the parent node. Can only be used when expression is being parsed. More... | |
virtual PatternMatchResult | PatternMatch (IElement CheckAgainst, Dictionary< string, IElement > AlreadyFound) |
Performs a pattern match operation. More... | |
override string | ToString () |
Static Public Member Functions | |
static int | GetHashCode (ScriptNode Node) |
Calculates a hash code for the contents of an array. More... | |
static int | GetHashCode (IEnumerable Set) |
Calculates a hash code for the contents of an array. More... | |
static bool | AreEqual (ScriptNode S1, ScriptNode S2) |
Compares if two script nodes are equal. More... | |
static bool | AreEqual (IEnumerable A1, IEnumerable A2) |
Compares if the contents of two enumerable sets are equal More... | |
static async Task< object > | WaitPossibleTask (object Result) |
Waits for any asynchronous process to terminate. More... | |
static object | UnnestPossibleTaskSync (object Result) |
Checks if Result is an asynchronous results. If so, blocks the current thread until the result is completed, and returns the completed result instead. More... | |
Static Public Attributes | |
static readonly ScriptNode | EmptyNode = new ConstantElement(ObjectValue.Null, 0, 0, new Expression("null")) |
Empty Script Node More... | |
Protected Member Functions | |
void | SetSubExpression (int Start, int Length) |
Sets the Start and Length properties of the node. More... | |
ScriptNode | DifferentiationChainRule (string VariableName, Variables Variables, ScriptNode Argument, ScriptNode Differentiation) |
Implements the differentiation chain rule, by differentiating the argument and multiplying it to the differentiation of the main node. More... | |
T | ToEnum< T > (IElement Value) |
Tries to convert an element to an enumeration value. More... | |
Static Protected Member Functions | |
static ? bool | ToBoolean (IElement Value) |
Tries to convert an element to a boolean value. More... | |
Properties | |
override string | FunctionName [get] |
Name of the function More... | |
override string[] | DefaultArgumentNames [get] |
Default Argument names More... | |
override bool | IsAsynchronous [get] |
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluated using FunctionTwoVariables.EvaluateAsync(Variables). More... | |
ScriptNode | Argument1 [get] |
Function argument 1. More... | |
ScriptNode | Argument2 [get] |
Function argument 2. More... | |
virtual string[] | Aliases [get] |
Optional aliases. If there are no aliases for the function, null is returned. More... | |
virtual string | DefaultVariableName [get] |
Default variable name, if any, null otherwise. More... | |
int | Start [get, set] |
Start position in script expression. More... | |
int | Length [get, set] |
Length of expression covered by node. More... | |
ScriptNode | Parent [get] |
Parent node. More... | |
Expression | Expression [get] |
Expression of which the node is a part. More... | |
string | SubExpression [get] |
Sub-expression defining the node. More... | |
Gets the current exchange rate between two currencies. Requires a currency converter to be configured for the system.
Definition at line 15 of file ExchangeRate.cs.
Paiwise.Functions.ExchangeRate.ExchangeRate | ( | ScriptNode | From, |
ScriptNode | To, | ||
int | Start, | ||
int | Length, | ||
Expression | Expression | ||
) |
Gets the current exchange rate between two currencies. Requires a currency converter to be configured for the system.
From | From Currency. |
To | To Currency. |
Start | Start position in script expression. |
Length | Length of expression covered by node. |
Expression | Expression containing script. |
Definition at line 26 of file ExchangeRate.cs.
|
staticinherited |
Compares if the contents of two enumerable sets are equal
A1 | Array 1 |
A2 | Array 2 |
Definition at line 292 of file ScriptNode.cs.
|
staticinherited |
Compares if two script nodes are equal.
S1 | Node 1. Can be null. |
S2 | Node 2. Can be null. |
Definition at line 275 of file ScriptNode.cs.
|
protectedinherited |
Implements the differentiation chain rule, by differentiating the argument and multiplying it to the differentiation of the main node.
VariableName | Name of variable to differentiate on. |
Variables | Collection of variables. |
Argument | Inner argument |
Differentiation | Differentiation of main node. |
Definition at line 195 of file ScriptNode.cs.
|
inherited |
Definition at line 192 of file FunctionTwoVariables.cs.
|
virtualinherited |
Evaluates the function.
Argument1 | Function argument 1. |
Argument2 | Function argument 2. |
Variables | Variables collection. |
Implements Waher.Script.Model.FunctionTwoVariables.
Definition at line 36 of file FunctionTwoScalarVariables.cs.
|
virtualinherited |
Evaluates the node, using the variables provided in the Variables collection.
Variables | Variables collection. |
Implements Waher.Script.Model.ScriptNode.
Reimplemented in Waher.IoTGateway.ScriptExtensions.Functions.ScriptResource.
Definition at line 69 of file FunctionTwoVariables.cs.
|
virtualinherited |
Evaluates the function.
Argument1 | Function argument 1. |
Argument2 | Function argument 2. |
Variables | Variables collection. |
Reimplemented from Waher.Script.Model.FunctionTwoVariables.
Definition at line 238 of file FunctionTwoScalarVariables.cs.
|
virtualinherited |
Evaluates the node, using the variables provided in the Variables collection.
Variables | Variables collection. |
Reimplemented from Waher.Script.Model.ScriptNode.
Reimplemented in Waher.IoTGateway.ScriptExtensions.Functions.ScriptResource.
Definition at line 82 of file FunctionTwoVariables.cs.
|
virtualinherited |
Evaluates the function on two scalar arguments.
Argument1 | Function argument 1. |
Argument2 | Function argument 2. |
Variables | Variables collection. |
Definition at line 214 of file FunctionTwoScalarVariables.cs.
|
virtualinherited |
Evaluates the function on two scalar arguments.
Argument1 | Function argument 1. |
Argument2 | Function argument 2. |
Variables | Variables collection. |
Reimplemented in Waher.Script.Statistics.Functions.Analytic.LowerIncompleteGamma, Waher.Script.Statistics.Functions.Analytic.UpperIncompleteGamma, Waher.Script.Functions.Transforms.Scale2D, Waher.Script.Functions.Transforms.Scale2DH, and Waher.Script.Functions.Transforms.Translate2DH.
Definition at line 202 of file FunctionTwoScalarVariables.cs.
|
virtualinherited |
Evaluates the function on two scalar arguments.
Argument1 | Function argument 1. |
Argument2 | Function argument 2. |
Variables | Variables collection. |
Reimplemented in Waher.Script.Statistics.Functions.Analytic.LowerIncompleteGamma, Waher.Script.Statistics.Functions.Analytic.UpperIncompleteGamma, Waher.Script.Functions.Analytic.ArcTan2, Waher.Script.Functions.ComplexNumbers.Polar, Waher.Script.Functions.Matrices.Ones, Waher.Script.Functions.Matrices.Zeroes, Waher.Script.Functions.Scalar.Max, Waher.Script.Functions.Scalar.Min, Waher.Script.Functions.Transforms.Scale2D, Waher.Script.Functions.Transforms.Scale2DH, and Waher.Script.Functions.Transforms.Translate2DH.
Definition at line 190 of file FunctionTwoScalarVariables.cs.
|
virtualinherited |
Evaluates the function on two scalar arguments.
Argument1 | Function argument 1. |
Argument2 | Function argument 2. |
Variables | Variables collection. |
Reimplemented in Waher.Content.Xsl.Functions.Transform, Waher.Script.Content.Functions.Encoding.Decode, Waher.Script.Cryptography.Functions.HashFunctions.Shake128, Waher.Script.Cryptography.Functions.HashFunctions.Shake256, Waher.Script.Graphs.Functions.Colors.Alpha, Waher.Script.Xml.Functions.GetAttribute, Waher.Script.Xml.Functions.GetElement, Waher.Script.Xml.Functions.HasAttribute, Waher.Script.Xml.Functions.HasElement, Waher.Script.Xml.Functions.SelectXml, Waher.Script.Xml.Functions.SelectXmlStr, Waher.Script.Functions.Scalar.Max, Waher.Script.Functions.Scalar.Min, Waher.Script.Functions.Strings.PadLeft, and Waher.Script.Functions.Strings.PadRight.
Definition at line 162 of file FunctionTwoScalarVariables.cs.
|
virtual |
Evaluates the function on two scalar arguments.
Argument1 | Function argument 1. |
Argument2 | Function argument 2. |
Variables | Variables collection. |
Reimplemented from Waher.Script.Model.FunctionTwoScalarVariables.
Definition at line 54 of file ExchangeRate.cs.
|
virtualinherited |
Evaluates the function on two scalar arguments.
Argument1 | Function argument 1. |
Argument2 | Function argument 2. |
Variables | Variables collection. |
Definition at line 416 of file FunctionTwoScalarVariables.cs.
|
virtualinherited |
Evaluates the function on two scalar arguments.
Argument1 | Function argument 1. |
Argument2 | Function argument 2. |
Variables | Variables collection. |
Definition at line 404 of file FunctionTwoScalarVariables.cs.
|
virtualinherited |
Evaluates the function on two scalar arguments.
Argument1 | Function argument 1. |
Argument2 | Function argument 2. |
Variables | Variables collection. |
Definition at line 392 of file FunctionTwoScalarVariables.cs.
|
virtualinherited |
Evaluates the function on two scalar arguments.
Argument1 | Function argument 1. |
Argument2 | Function argument 2. |
Variables | Variables collection. |
Reimplemented in Waher.Content.Xsl.Functions.Transform, Waher.Script.Content.Functions.Encoding.Decode, Waher.Script.Cryptography.Functions.HashFunctions.Shake128, Waher.Script.Cryptography.Functions.HashFunctions.Shake256, Waher.Script.Graphs.Functions.Colors.Alpha, Waher.Script.Xml.Functions.GetAttribute, Waher.Script.Xml.Functions.GetElement, Waher.Script.Xml.Functions.HasAttribute, Waher.Script.Xml.Functions.HasElement, Waher.Script.Xml.Functions.SelectXml, Waher.Script.Xml.Functions.SelectXmlStr, Waher.Script.Functions.Scalar.Max, and Waher.Script.Functions.Scalar.Min.
Definition at line 364 of file FunctionTwoScalarVariables.cs.
|
virtual |
Evaluates the function on two scalar arguments.
Argument1 | Function argument 1. |
Argument2 | Function argument 2. |
Variables | Variables collection. |
Reimplemented from Waher.Script.Model.FunctionTwoScalarVariables.
Definition at line 66 of file ExchangeRate.cs.
|
inherited |
Calls the callback method for all child nodes.
Callback | Callback method to call. |
State | State object to pass on to the callback method. |
DepthFirst | If calls are made depth first (true) or on each node and then its leaves (false). |
Definition at line 243 of file ScriptNode.cs.
|
virtualinherited |
Calls the callback method for all child nodes.
Callback | Callback method to call. |
State | State object to pass on to the callback method. |
Order | Order to traverse the nodes. |
Implements Waher.Script.Model.ScriptNode.
Definition at line 121 of file FunctionTwoVariables.cs.
|
inherited |
Definition at line 201 of file FunctionTwoVariables.cs.
|
staticinherited |
Calculates a hash code for the contents of an array.
Set | Enumerable set. |
Definition at line 340 of file ScriptNode.cs.
|
staticinherited |
Calculates a hash code for the contents of an array.
Node | Node. Can be null. |
Definition at line 330 of file ScriptNode.cs.
|
virtualinherited |
Performs a pattern match operation.
CheckAgainst | Value to check against. |
AlreadyFound | Variables already identified. |
Reimplemented in Waher.Script.Content.Functions.Duration, Waher.Script.Xml.Functions.Xml, Waher.Script.Xml.Model.XmlScriptDocument, Waher.Script.Xml.Model.XmlScriptValue, Waher.Script.Functions.DateAndTime.DateTime, Waher.Script.Functions.DateAndTime.DateTimeLocal, Waher.Script.Functions.DateAndTime.DateTimeOffset, Waher.Script.Functions.DateAndTime.DateTimeUtc, Waher.Script.Functions.DateAndTime.TimeSpan, Waher.Script.Functions.Runtime.Optional, Waher.Script.Functions.Runtime.Required, Waher.Script.Functions.Scalar.Abs, Waher.Script.Functions.Scalar.Boolean, Waher.Script.Functions.Scalar.Ceiling, Waher.Script.Functions.Scalar.Double, Waher.Script.Functions.Scalar.Floor, Waher.Script.Functions.Scalar.Guid, Waher.Script.Functions.Scalar.Integer, Waher.Script.Functions.Scalar.Number, Waher.Script.Functions.Scalar.Round, Waher.Script.Functions.Scalar.Sign, Waher.Script.Functions.Scalar.String, Waher.Script.Functions.Scalar.Uri, Waher.Script.Model.ConstantElement, Waher.Script.Model.VariableReference, Waher.Script.Operators.Arithmetics.Invert, Waher.Script.Operators.Comparisons.EqualTo, Waher.Script.Operators.Comparisons.GreaterThan, Waher.Script.Operators.Comparisons.GreaterThanOrEqualTo, Waher.Script.Operators.Comparisons.LesserThan, Waher.Script.Operators.Comparisons.LesserThanOrEqualTo, Waher.Script.Operators.Comparisons.Like, Waher.Script.Operators.Comparisons.NotEqualTo, Waher.Script.Operators.Comparisons.NotLike, Waher.Script.Operators.Comparisons.Range, Waher.Script.Operators.Matrices.MatrixDefinition, Waher.Script.Operators.Matrices.ToMatrix, Waher.Script.Operators.ObjectExNihilo, Waher.Script.Operators.Sets.SetDefinition, Waher.Script.Operators.Sets.ToSet, Waher.Script.Operators.Vectors.ToVector, and Waher.Script.Operators.Vectors.VectorDefinition.
Definition at line 169 of file ScriptNode.cs.
|
inherited |
Sets the parent node. Can only be used when expression is being parsed.
Parent | Parent Node |
Definition at line 132 of file ScriptNode.cs.
|
protectedinherited |
Sets the Start and Length properties of the node.
Start | Start position in script expression. |
Length | Length of expression covered by node. |
Definition at line 111 of file ScriptNode.cs.
|
staticprotectedinherited |
Tries to convert an element to a boolean value.
Value | Element value. |
Definition at line 375 of file ScriptNode.cs.
|
protectedinherited |
Tries to convert an element to an enumeration value.
Value | Element value. |
T | : | struct |
Definition at line 394 of file ScriptNode.cs.
|
inherited |
Definition at line 359 of file ScriptNode.cs.
|
staticinherited |
Checks if Result is an asynchronous results. If so, blocks the current thread until the result is completed, and returns the completed result instead.
Result | Result |
Definition at line 436 of file ScriptNode.cs.
|
staticinherited |
Waits for any asynchronous process to terminate.
Result | Result, possibly asynchronous result. |
Definition at line 417 of file ScriptNode.cs.
|
staticinherited |
Empty Script Node
Definition at line 452 of file ScriptNode.cs.
|
getinherited |
Optional aliases. If there are no aliases for the function, null is returned.
Implements Waher.Script.Model.IFunction.
Definition at line 32 of file Function.cs.
|
getinherited |
Function argument 1.
Definition at line 46 of file FunctionTwoVariables.cs.
|
getinherited |
Function argument 2.
Definition at line 51 of file FunctionTwoVariables.cs.
|
get |
Default Argument names
Implements Waher.Script.Model.IFunction.
Definition at line 39 of file ExchangeRate.cs.
|
getinherited |
Default variable name, if any, null otherwise.
Definition at line 45 of file Function.cs.
|
getinherited |
Expression of which the node is a part.
Definition at line 177 of file ScriptNode.cs.
|
get |
Name of the function
Implements Waher.Script.Model.IFunction.
Definition at line 34 of file ExchangeRate.cs.
|
get |
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluated using FunctionTwoVariables.EvaluateAsync(Variables).
Definition at line 45 of file ExchangeRate.cs.
|
getsetinherited |
Length of expression covered by node.
Definition at line 100 of file ScriptNode.cs.
|
getinherited |
Parent node.
Definition at line 126 of file ScriptNode.cs.
|
getsetinherited |
Start position in script expression.
Definition at line 91 of file ScriptNode.cs.
|
getinherited |
Sub-expression defining the node.
Definition at line 182 of file ScriptNode.cs.