2using System.Collections.Generic;
3using System.Threading.Tasks;
84 if (!(
Arguments[1].AssociatedObjectValue is Array A))
85 throw new ScriptRuntimeException(
"Second parameter to Encode should be an array of acceptable content types.",
this);
88 string[] AcceptedTypes =
new string[c];
90 for (i = 0; i < c; i++)
95 ContentType = P.Value;
101 ContentType = P.Value;
Static class managing encoding and decoding of internet content.
static Task< KeyValuePair< byte[], string > > EncodeAsync(object Object, Encoding Encoding, params string[] AcceptedContentTypes)
Encodes an object.
override string FunctionName
Name of the function
Encode(ScriptNode Object, ScriptNode AcceptedTypes, int Start, int Length, Expression Expression)
Encode(Object,AcceptedTypes)
Encode(ScriptNode Object, int Start, int Length, Expression Expression)
Encode(Object)
override string[] DefaultArgumentNames
Default Argument names
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
override async Task< IElement > EvaluateAsync(IElement[] Arguments, Variables Variables)
Evaluates the function.
override IElement Evaluate(IElement[] Arguments, Variables Variables)
Evaluates the function.
Script runtime exception.
Class managing a script expression.
Base class for multivariate funcions.
ScriptNode[] Arguments
Function arguments.
static readonly ArgumentType[] argumentTypes1Normal
One scalar parameter.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
static async Task< object > WaitPossibleTask(object Result)
Waits for any asynchronous process to terminate.
Expression Expression
Expression of which the node is a part.
int Start
Start position in script expression.
Basic interface for all types of elements.
ArgumentType
Type of parameter used in a function definition or a lambda definition.