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 RevokeSponsorshipOp Decode(XdrDataInputStream stream) { RevokeSponsorshipOp decodedRevokeSponsorshipOp = new RevokeSponsorshipOp(); RevokeSponsorshipType discriminant = RevokeSponsorshipType.Decode(stream); decodedRevokeSponsorshipOp.Discriminant = discriminant; switch (decodedRevokeSponsorshipOp.Discriminant.InnerValue) { case RevokeSponsorshipType.RevokeSponsorshipTypeEnum.REVOKE_SPONSORSHIP_LEDGER_ENTRY: decodedRevokeSponsorshipOp.LedgerKey = LedgerKey.Decode(stream); break; case RevokeSponsorshipType.RevokeSponsorshipTypeEnum.REVOKE_SPONSORSHIP_SIGNER: decodedRevokeSponsorshipOp.Signer = RevokeSponsorshipOpSigner.Decode(stream); break; } return(decodedRevokeSponsorshipOp); }
public static BucketEntry Decode(XdrDataInputStream stream) { BucketEntry decodedBucketEntry = new BucketEntry(); BucketEntryType discriminant = BucketEntryType.Decode(stream); decodedBucketEntry.Discriminant = discriminant; switch (decodedBucketEntry.Discriminant.InnerValue) { case BucketEntryType.BucketEntryTypeEnum.LIVEENTRY: decodedBucketEntry.LiveEntry = LedgerEntry.Decode(stream); break; case BucketEntryType.BucketEntryTypeEnum.DEADENTRY: decodedBucketEntry.DeadEntry = LedgerKey.Decode(stream); break; } return(decodedBucketEntry); }