public static void Encode(IByteWriter stream, AccountEntry encodedAccountEntry) { AccountID.Encode(stream, encodedAccountEntry.AccountID); Int64.Encode(stream, encodedAccountEntry.Balance); SequenceNumber.Encode(stream, encodedAccountEntry.SeqNum); Uint32.Encode(stream, encodedAccountEntry.NumSubEntries); if (encodedAccountEntry.InflationDest != null) { XdrEncoding.EncodeInt32(1, stream); AccountID.Encode(stream, encodedAccountEntry.InflationDest); } else { XdrEncoding.EncodeInt32(0, stream); } Uint32.Encode(stream, encodedAccountEntry.Flags); String32.Encode(stream, encodedAccountEntry.HomeDomain); Thresholds.Encode(stream, encodedAccountEntry.Thresholds); int signerssize = encodedAccountEntry.Signers.Length; XdrEncoding.EncodeInt32(signerssize, stream); for (int i = 0; i < signerssize; i++) { Signer.Encode(stream, encodedAccountEntry.Signers[i]); } AccountEntryExt.Encode(stream, encodedAccountEntry.Ext); }
public static void Encode(XdrDataOutputStream stream, AccountEntry encodedAccountEntry) { AccountID.Encode(stream, encodedAccountEntry.AccountID); Int64.Encode(stream, encodedAccountEntry.Balance); SequenceNumber.Encode(stream, encodedAccountEntry.SeqNum); Uint32.Encode(stream, encodedAccountEntry.NumSubEntries); if (encodedAccountEntry.InflationDest != null) { stream.WriteInt(1); AccountID.Encode(stream, encodedAccountEntry.InflationDest); } else { stream.WriteInt(0); } Uint32.Encode(stream, encodedAccountEntry.Flags); String32.Encode(stream, encodedAccountEntry.HomeDomain); Thresholds.Encode(stream, encodedAccountEntry.Thresholds); int signerssize = encodedAccountEntry.Signers.Length; stream.WriteInt(signerssize); for (int i = 0; i < signerssize; i++) { Signer.Encode(stream, encodedAccountEntry.Signers[i]); } AccountEntryExt.Encode(stream, encodedAccountEntry.Ext); }