public static void Encode(IByteWriter stream, StellarValueExt encodedStellarValueExt) { XdrEncoding.EncodeInt32(encodedStellarValueExt.Discriminant, stream); switch (encodedStellarValueExt.Discriminant) { case 0: break; } }
public static void Encode(XdrDataOutputStream stream, StellarValueExt encodedStellarValueExt) { stream.WriteInt(encodedStellarValueExt.Discriminant); switch (encodedStellarValueExt.Discriminant) { case 0: break; } }
public static StellarValueExt Decode(IByteReader stream) { StellarValueExt decodedStellarValueExt = new StellarValueExt(); decodedStellarValueExt.Discriminant = XdrEncoding.DecodeInt32(stream); switch (decodedStellarValueExt.Discriminant) { case 0: break; } return decodedStellarValueExt; }
public static StellarValueExt Decode(IByteReader stream) { StellarValueExt decodedStellarValueExt = new StellarValueExt(); decodedStellarValueExt.Discriminant = XdrEncoding.DecodeInt32(stream); switch (decodedStellarValueExt.Discriminant) { case 0: break; } return(decodedStellarValueExt); }
public static StellarValueExt Decode(XdrDataInputStream stream) { var decodedStellarValueExt = new StellarValueExt(); var discriminant = stream.ReadInt(); decodedStellarValueExt.Discriminant = discriminant; switch (decodedStellarValueExt.Discriminant) { case 0: break; } return(decodedStellarValueExt); }
public static void Encode(XdrDataOutputStream stream, StellarValue encodedStellarValue) { Hash.Encode(stream, encodedStellarValue.TxSetHash); Uint64.Encode(stream, encodedStellarValue.CloseTime); var upgradessize = encodedStellarValue.Upgrades.Length; stream.WriteInt(upgradessize); for (var i = 0; i < upgradessize; i++) { UpgradeType.Encode(stream, encodedStellarValue.Upgrades[i]); } StellarValueExt.Encode(stream, encodedStellarValue.Ext); }
public static void Encode(IByteWriter stream, StellarValue encodedStellarValue) { Hash.Encode(stream, encodedStellarValue.TxSetHash); Uint64.Encode(stream, encodedStellarValue.CloseTime); int upgradessize = encodedStellarValue.Upgrades.Length; XdrEncoding.EncodeInt32(upgradessize, stream); for (int i = 0; i < upgradessize; i++) { UpgradeType.Encode(stream, encodedStellarValue.Upgrades[i]); } StellarValueExt.Encode(stream, encodedStellarValue.Ext); }
public static void Encode(XdrDataOutputStream stream, StellarValueExt encodedStellarValueExt) { stream.WriteInt((int)encodedStellarValueExt.Discriminant.InnerValue); switch (encodedStellarValueExt.Discriminant.InnerValue) { case StellarValueType.StellarValueTypeEnum.STELLAR_VALUE_BASIC: break; case StellarValueType.StellarValueTypeEnum.STELLAR_VALUE_SIGNED: LedgerCloseValueSignature.Encode(stream, encodedStellarValueExt.LcValueSignature); break; } }
public static StellarValue Decode(XdrDataInputStream stream) { var decodedStellarValue = new StellarValue(); decodedStellarValue.TxSetHash = Hash.Decode(stream); decodedStellarValue.CloseTime = Uint64.Decode(stream); var upgradessize = stream.ReadInt(); decodedStellarValue.Upgrades = new UpgradeType[upgradessize]; for (var i = 0; i < upgradessize; i++) { decodedStellarValue.Upgrades[i] = UpgradeType.Decode(stream); } decodedStellarValue.Ext = StellarValueExt.Decode(stream); return(decodedStellarValue); }
public static StellarValue Decode(IByteReader stream) { StellarValue decodedStellarValue = new StellarValue(); decodedStellarValue.TxSetHash = Hash.Decode(stream); decodedStellarValue.CloseTime = Uint64.Decode(stream); int upgradessize = XdrEncoding.DecodeInt32(stream); decodedStellarValue.Upgrades = new UpgradeType[upgradessize]; for (int i = 0; i < upgradessize; i++) { decodedStellarValue.Upgrades[i] = UpgradeType.Decode(stream); } decodedStellarValue.Ext = StellarValueExt.Decode(stream); return(decodedStellarValue); }
public static StellarValueExt Decode(XdrDataInputStream stream) { StellarValueExt decodedStellarValueExt = new StellarValueExt(); StellarValueType discriminant = StellarValueType.Decode(stream); decodedStellarValueExt.Discriminant = discriminant; switch (decodedStellarValueExt.Discriminant.InnerValue) { case StellarValueType.StellarValueTypeEnum.STELLAR_VALUE_BASIC: break; case StellarValueType.StellarValueTypeEnum.STELLAR_VALUE_SIGNED: decodedStellarValueExt.LcValueSignature = LedgerCloseValueSignature.Decode(stream); break; } return(decodedStellarValueExt); }