public static Transaction Decode(XdrDataInputStream stream) { Transaction decodedTransaction = new Transaction(); decodedTransaction.SourceAccount = AccountID.Decode(stream); decodedTransaction.Fee = Uint32.Decode(stream); decodedTransaction.SeqNum = SequenceNumber.Decode(stream); int TimeBoundsPresent = stream.ReadInt(); if (TimeBoundsPresent != 0) { decodedTransaction.TimeBounds = TimeBounds.Decode(stream); } decodedTransaction.Memo = Memo.Decode(stream); int operationssize = stream.ReadInt(); decodedTransaction.Operations = new Operation[operationssize]; for (int i = 0; i < operationssize; i++) { decodedTransaction.Operations[i] = Operation.Decode(stream); } decodedTransaction.Ext = TransactionExt.Decode(stream); return(decodedTransaction); }
public static Transaction Decode(IByteReader stream) { Transaction decodedTransaction = new Transaction(); decodedTransaction.SourceAccount = AccountID.Decode(stream); decodedTransaction.Fee = Uint32.Decode(stream); decodedTransaction.SeqNum = SequenceNumber.Decode(stream); int timeBoundsPresent = XdrEncoding.DecodeInt32(stream); if (timeBoundsPresent != 0) { decodedTransaction.TimeBounds = TimeBounds.Decode(stream); } decodedTransaction.Memo = Memo.Decode(stream); int operationssize = XdrEncoding.DecodeInt32(stream); decodedTransaction.Operations = new Operation[operationssize]; for (int i = 0; i < operationssize; i++) { decodedTransaction.Operations[i] = Operation.Decode(stream); } decodedTransaction.Ext = TransactionExt.Decode(stream); return(decodedTransaction); }