Aptos Unity SDK
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Properties | List of all members
Aptos.BCS.Sequence Class Reference

Representation of a Transaction Argument sequence / list. NOTE: Transaction Arguments have different types hence they cannot be represented using a regular list. NOTE: This class does not implement deserialization because the developer would know the types beforehand, and hence would apply the appropriate deserialization based on the type. More...

Public Member Functions

object GetValue ()
 Gets the internal list of objects inside the Sequence.
 
 Sequence (ISerializable[] serializable)
 Creates a Sequence object from a list of serializable objects, e.g. U8, AccountAddress.
 
void Serialize (Serialization serializer)
 Serialize the object.
Parameters
serializer

 
override bool Equals (object other)
 
override string ToString ()
 
override int GetHashCode ()
 

Static Public Member Functions

static Sequence Deserialize (Deserialization deser)
 Deserializes a byte array hosted inside the Deserializer.
Parameters
deserializer
Returns

 

Properties

int Length [get]
 The length of the Sequence.
 

Detailed Description

Representation of a Transaction Argument sequence / list. NOTE: Transaction Arguments have different types hence they cannot be represented using a regular list. NOTE: This class does not implement deserialization because the developer would know the types beforehand, and hence would apply the appropriate deserialization based on the type.

Fixed and Variable Length Sequences Sequences can be made of up of any BCS supported types(even complex structures) but all elements in the sequence must be of the same type.If the length of a sequence is fixed and well known then BCS represents this as just the concatenation of the serialized form of each individual element in the sequence. If the length of the sequence can be variable, then the serialized sequence is length prefixed with a ULEB128-encoded unsigned integer indicating the number of elements in the sequence. All variable length sequences must be MAX_SEQUENCE_LENGTH elements long or less.

Constructor & Destructor Documentation

◆ Sequence()

Aptos.BCS.Sequence.Sequence ( ISerializable[]  serializable)

Creates a Sequence object from a list of serializable objects, e.g. U8, AccountAddress.

Parameters
serializableA list of serializable objects.

Member Function Documentation

◆ Deserialize()

static Sequence Aptos.BCS.Sequence.Deserialize ( Deserialization  deser)
inlinestatic

Deserializes a byte array hosted inside the Deserializer.

Parameters
deserializer
Returns

Implements Aptos.BCS.ISerializable.

◆ GetValue()

object Aptos.BCS.Sequence.GetValue ( )

Gets the internal list of objects inside the Sequence.

Returns
The list of object.

◆ Serialize()

void Aptos.BCS.Sequence.Serialize ( Serialization  serializer)
inline

Serialize the object.

Parameters
serializer

Implements Aptos.BCS.ISerializable.


The documentation for this class was generated from the following file: