public static LedgerEntryChange Decode(XdrDataInputStream stream) { LedgerEntryChange decodedLedgerEntryChange = new LedgerEntryChange(); LedgerEntryChangeType discriminant = LedgerEntryChangeType.Decode(stream); decodedLedgerEntryChange.Discriminant = discriminant; switch (decodedLedgerEntryChange.Discriminant.InnerValue) { case LedgerEntryChangeType.LedgerEntryChangeTypeEnum.LEDGER_ENTRY_CREATED: decodedLedgerEntryChange.Created = LedgerEntry.Decode(stream); break; case LedgerEntryChangeType.LedgerEntryChangeTypeEnum.LEDGER_ENTRY_UPDATED: decodedLedgerEntryChange.Updated = LedgerEntry.Decode(stream); break; case LedgerEntryChangeType.LedgerEntryChangeTypeEnum.LEDGER_ENTRY_REMOVED: decodedLedgerEntryChange.Removed = LedgerKey.Decode(stream); break; case LedgerEntryChangeType.LedgerEntryChangeTypeEnum.LEDGER_ENTRY_STATE: decodedLedgerEntryChange.State = LedgerEntry.Decode(stream); break; } return(decodedLedgerEntryChange); }
public static void Encode(XdrDataOutputStream stream, LedgerEntryChangeType value) { stream.WriteInt((int)value.InnerValue); }