Class StObject
Class for Serializing/Deserializing objects
Inheritance
Implements
Namespace: Xrpl.BinaryCodec.Types
Assembly: Xrpl.BinaryCodec.dll
Syntax
public class StObject : object, ISerializedType
Constructors
| Improve this Doc View SourceStObject()
Construct a STObject from a JSON object
Declaration
public StObject()
Fields
| Improve this Doc View SourceFields
Declaration
protected SortedDictionary<Field, ISerializedType> Fields
Field Value
| Type | Description |
|---|---|
| SortedDictionary<Field, ISerializedType> |
Properties
| Improve this Doc View SourceItem[AccountIdField]
add AccountIdField field to this object
Declaration
public AccountId this[AccountIdField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| AccountIdField | f | AccountIdFieldfield |
Property Value
| Type | Description |
|---|---|
| AccountId |
Item[AmountField]
add AmountField field to this object
Declaration
public Amount this[AmountField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| AmountField | f | AmountFieldfield |
Property Value
| Type | Description |
|---|---|
| Amount |
Item[BlobField]
add BlobField field to this object
Declaration
public Blob this[BlobField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| BlobField | f | BlobFieldfield |
Property Value
| Type | Description |
|---|---|
| Blob |
Item[EngineResultField]
add EngineResultField field to this object
Declaration
public EngineResult this[EngineResultField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| EngineResultField | f | EngineResultFieldfield |
Property Value
| Type | Description |
|---|---|
| EngineResult |
Item[Hash128Field]
add Hash128Field field to this object
Declaration
public Hash128 this[Hash128Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Hash128Field | f | Hash128Fieldfield |
Property Value
| Type | Description |
|---|---|
| Hash128 |
Item[Hash160Field]
add Hash160Field field to this object
Declaration
public Hash160 this[Hash160Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Hash160Field | f | Hash160Fieldfield |
Property Value
| Type | Description |
|---|---|
| Hash160 |
Item[Hash256Field]
add Hash256Field field to this object
Declaration
public Hash256 this[Hash256Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Hash256Field | f | Hash256Fieldfield |
Property Value
| Type | Description |
|---|---|
| Hash256 |
Item[LedgerEntryTypeField]
add LedgerEntryTypeField field to this object
Declaration
public LedgerEntryType this[LedgerEntryTypeField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| LedgerEntryTypeField | f | LedgerEntryTypeFieldfield |
Property Value
| Type | Description |
|---|---|
| LedgerEntryType |
Item[PathSetField]
add PathSetField field to this object
Declaration
public PathSet this[PathSetField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| PathSetField | f | PathSetFieldfield |
Property Value
| Type | Description |
|---|---|
| PathSet |
Item[StArrayField]
add StArrayField field to this object
Declaration
public StArray this[StArrayField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| StArrayField | f | StArrayFieldfield |
Property Value
| Type | Description |
|---|---|
| StArray |
Item[StObjectField]
add StObjectField field to this object
Declaration
public StObject this[StObjectField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| StObjectField | f | StObjectFieldfield |
Property Value
| Type | Description |
|---|---|
| StObject |
Item[TransactionTypeField]
add TransactionTypeField field to this object
Declaration
public TransactionType this[TransactionTypeField f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| TransactionTypeField | f | TransactionTypeFieldfield |
Property Value
| Type | Description |
|---|---|
| TransactionType |
Item[Uint16Field]
add Uint16Field field to this object
Declaration
public Uint16 this[Uint16Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Uint16Field | f | Uint16Fieldfield |
Property Value
| Type | Description |
|---|---|
| Uint16 |
Item[Uint32Field]
add Uint32Field field to this object
Declaration
public Uint32 this[Uint32Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Uint32Field | f | Uint32Fieldfield |
Property Value
| Type | Description |
|---|---|
| Uint32 |
Item[Uint64Field]
add Uint64Field field to this object
Declaration
public Uint64 this[Uint64Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Uint64Field | f | Uint64Fieldfield |
Property Value
| Type | Description |
|---|---|
| Uint64 |
Item[Uint8Field]
add Uint8Field field to this object
Declaration
public Uint8 this[Uint8Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Uint8Field | f | Uint8Fieldfield |
Property Value
| Type | Description |
|---|---|
| Uint8 |
Item[Vector256Field]
add Vector256Field field to this object
Declaration
public Vector256 this[Vector256Field f] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| Vector256Field | f | Vector256Fieldfield |
Property Value
| Type | Description |
|---|---|
| Vector256 |
Methods
| Improve this Doc View SourceFromHex(String)
Construct a STObject from a hex string
Declaration
public static StObject FromHex(string s)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | s | hex string |
Returns
| Type | Description |
|---|---|
| StObject |
FromJson(JToken)
Construct a STObject from a JSON object
Declaration
public static StObject FromJson(JToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| JToken | token | An object to include |
Returns
| Type | Description |
|---|---|
| StObject |
FromJson(JToken, Boolean)
Construct a STObject from a JSON object
Declaration
public static StObject FromJson(JToken token, bool signingOnly)
Parameters
| Type | Name | Description |
|---|---|---|
| JToken | token | An object to include |
| System.Boolean | signingOnly |
Returns
| Type | Description |
|---|---|
| StObject |
Exceptions
| Type | Condition |
|---|---|
| InvalidJsonException | unknown field or token is not an object |
FromParser(BinaryParser, Nullable<Int32>)
Construct a STObject from a BinaryParser
Declaration
public static StObject FromParser(BinaryParser parser, int? hint = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BinaryParser | parser | BinaryParser to read STObject from |
| System.Nullable<System.Int32> | hint |
Returns
| Type | Description |
|---|---|
| StObject |
Has(Field)
check that object contains field
Declaration
public bool Has(Field field)
Parameters
| Type | Name | Description |
|---|---|---|
| Field | field | field |
Returns
| Type | Description |
|---|---|
| System.Boolean |
SetFlag(UInt32)
Set flag to this object
Declaration
public StObject SetFlag(uint flags)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | flags | flag |
Returns
| Type | Description |
|---|---|
| StObject |
SigningData()
Signing this data
Declaration
public byte[] SigningData()
Returns
| Type | Description |
|---|---|
| System.Byte[] |
ToBytes()
this object to bytes array
Declaration
public byte[] ToBytes()
Returns
| Type | Description |
|---|---|
| System.Byte[] |
ToBytes(IBytesSink)
to bytes Sink
Declaration
public void ToBytes(IBytesSink to)
Parameters
| Type | Name | Description |
|---|---|---|
| IBytesSink | to |
ToBytes(IBytesSink, Func<Field, Boolean>)
to bytes Sink
Declaration
public void ToBytes(IBytesSink to, Func<Field, bool> p)
Parameters
| Type | Name | Description |
|---|---|---|
| IBytesSink | to | bytes Sink container |
| Func<Field, System.Boolean> | p | field selector |
ToJson()
Get the JSON representation of this type
Declaration
public JToken ToJson()
Returns
| Type | Description |
|---|---|
| JToken |
ToJsonObject()
Get the JSON interpretation of this.bytes
Declaration
public JObject ToJsonObject()
Returns
| Type | Description |
|---|---|
| JObject |
Operators
| Improve this Doc View SourceImplicit(JToken to StObject)
Construct a STObject from a JSON object
Declaration
public static implicit operator StObject(JToken token)
Parameters
| Type | Name | Description |
|---|---|---|
| JToken | token | An object to include |
Returns
| Type | Description |
|---|---|
| StObject |