2using System.Collections.Generic;
4using System.Threading.Tasks;
56 public override string[]
Aliases =>
new string[] {
"FromBinary" };
99 if (!(
Arguments[0].AssociatedObjectValue is
byte[] Bin))
100 throw new ScriptRuntimeException(
"The first argument to the Deserialize function must be a byte array.",
this);
105 BaseType = typeof(
object);
109 throw new ScriptRuntimeException(
"The optional second argument to the Deserialize function must be a type value.",
this);
117 object Result =
null;
118 List<object> List =
null;
124 else if (List is
null)
125 List =
new List<object>() { Result };
127 Result = await Serializer.
Deserialize(Reader,
null,
false);
Static interface for ledger persistence. In order to work, a ledger provider has to be assigned to it...
static ILedgerProvider Provider
Registered ledger provider.
Manages binary deserialization of data.
Script runtime exception.
Class managing a script expression.
Base class for multivariate funcions.
ScriptNode[] Arguments
Function arguments.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
Expression Expression
Expression of which the node is a part.
int Start
Start position in script expression.
Deserializes an object from a binary string of octets, using existing serializers.
override async Task< IElement > EvaluateAsync(IElement[] Arguments, Variables Variables)
Evaluates the function.
override string FunctionName
Name of the function
override string[] DefaultArgumentNames
Default Argument names
override string[] Aliases
Optional aliases. If there are no aliases for the function, null is returned.
Deserialize(ScriptNode Argument, ScriptNode BaseType, int Start, int Length, Expression Expression)
Deserializes an object from a binary string of octets, using existing serializers.
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
override IElement Evaluate(IElement[] Arguments, Variables Variables)
Evaluates the function.
Deserialize(ScriptNode Argument, int Start, int Length, Expression Expression)
Deserializes an object from a binary string of octets, using existing serializers.
virtual IDeserializer GetDeserializer(Variables Variables, byte[] Data)
Creates a deserializer for the operation.
Interface for deserializers.
bool ReadBit()
Deserializes a bit.
Interface for object serializers.
Task< object > Deserialize(IDeserializer Reader, uint? DataType, bool Embedded)
Deserializes an object from a binary source.
Basic interface for all types of elements.
ArgumentType
Type of parameter used in a function definition or a lambda definition.