3using System.Threading.Tasks;
40 public override string[]
Aliases =>
new string[] {
"ToBinary" };
96 T = Value?.GetType() ?? typeof(
object);
100 Serializer = await Provider.GetObjectSerializer(T);
104 await Serializer.
Serialize(Output,
true,
false, Value,
null);
109 Value =
Argument.AssociatedObjectValue;
110 Serializer = await Provider.GetObjectSerializer(Value?.GetType() ?? typeof(
object));
112 await Serializer.
Serialize(Output,
true,
false, Value,
null);
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 serialization of data.
Script runtime exception.
Class managing a script expression.
Base class for funcions of one variable.
ScriptNode Argument
Function argument.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
int Start
Start position in script expression.
Serializes an object to a binary string of octets, using existing serializers.
Serialize(ScriptNode Argument, int Start, int Length, Expression Expression)
Serializes an object to a binary string of octets, using existing serializers.
override string[] Aliases
Optional aliases. If there are no aliases for the function, null is returned.
override string FunctionName
Name of the function
override string[] DefaultArgumentNames
Default Argument names
override IElement Evaluate(IElement Argument, Variables Variables)
Evaluates the function.
virtual ISerializer GetSerializer(Variables Variables)
Creates a serializer for the operation.
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
override async Task< IElement > EvaluateAsync(IElement Argument, Variables Variables)
Evaluates the function.
Interface for object serializers.
Task Serialize(ISerializer Writer, bool WriteTypeCode, bool Embedded, object Value, object State)
Serializes an object to a binary destination.
Interface for serializers.
byte[] GetSerialization()
Gets the binary serialization.
void WriteBit(bool Bit)
Serializes a bit.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
ICollection< IElement > ChildElements
An enumeration of child elements. If the element is a scalar, this property will return null.
Basic interface for vectors.