コード例 #1
0
            public static void Encode(XdrDataOutputStream stream, LedgerEntryData encodedLedgerEntryData)
            {
                stream.WriteInt((int)encodedLedgerEntryData.Discriminant.InnerValue);
                switch (encodedLedgerEntryData.Discriminant.InnerValue)
                {
                case LedgerEntryType.LedgerEntryTypeEnum.ACCOUNT:
                    AccountEntry.Encode(stream, encodedLedgerEntryData.Account);
                    break;

                case LedgerEntryType.LedgerEntryTypeEnum.TRUSTLINE:
                    TrustLineEntry.Encode(stream, encodedLedgerEntryData.TrustLine);
                    break;

                case LedgerEntryType.LedgerEntryTypeEnum.OFFER:
                    OfferEntry.Encode(stream, encodedLedgerEntryData.Offer);
                    break;

                case LedgerEntryType.LedgerEntryTypeEnum.DATA:
                    DataEntry.Encode(stream, encodedLedgerEntryData.Data);
                    break;

                case LedgerEntryType.LedgerEntryTypeEnum.CLAIMABLE_BALANCE:
                    ClaimableBalanceEntry.Encode(stream, encodedLedgerEntryData.ClaimableBalance);
                    break;
                }
            }
コード例 #2
0
            public static void Encode(XdrDataOutputStream stream,
                                      ManageOfferSuccessResultOffer encodedManageOfferSuccessResultOffer)
            {
                stream.WriteInt((int)encodedManageOfferSuccessResultOffer.Discriminant.InnerValue);

                switch (encodedManageOfferSuccessResultOffer.Discriminant.InnerValue)
                {
                case ManageOfferEffect.ManageOfferEffectEnum.MANAGE_OFFER_CREATED:
                case ManageOfferEffect.ManageOfferEffectEnum.MANAGE_OFFER_UPDATED:
                    OfferEntry.Encode(stream, encodedManageOfferSuccessResultOffer.Offer);
                    break;
                }
            }
コード例 #3
0
            public static void Encode(IByteWriter stream, ManageOfferSuccessResultOffer encodedManageOfferSuccessResultOffer)
            {
                XdrEncoding.EncodeInt32((int)encodedManageOfferSuccessResultOffer.Discriminant.InnerValue, stream);
                switch (encodedManageOfferSuccessResultOffer.Discriminant.InnerValue)
                {
                case ManageOfferEffect.ManageOfferEffectEnum.MANAGE_OFFER_CREATED:
                case ManageOfferEffect.ManageOfferEffectEnum.MANAGE_OFFER_UPDATED:
                    OfferEntry.Encode(stream, encodedManageOfferSuccessResultOffer.Offer);
                    break;

                default:
                    break;
                }
            }
コード例 #4
0
            public static void Encode(IByteWriter stream, LedgerEntryData encodedLedgerEntryData)
            {
                XdrEncoding.EncodeInt32((int)encodedLedgerEntryData.Discriminant.InnerValue, stream);
                switch (encodedLedgerEntryData.Discriminant.InnerValue)
                {
                case LedgerEntryType.LedgerEntryTypeEnum.ACCOUNT:
                    AccountEntry.Encode(stream, encodedLedgerEntryData.Account);
                    break;

                case LedgerEntryType.LedgerEntryTypeEnum.TRUSTLINE:
                    TrustLineEntry.Encode(stream, encodedLedgerEntryData.TrustLine);
                    break;

                case LedgerEntryType.LedgerEntryTypeEnum.OFFER:
                    OfferEntry.Encode(stream, encodedLedgerEntryData.Offer);
                    break;

                case LedgerEntryType.LedgerEntryTypeEnum.DATA:
                    DataEntry.Encode(stream, encodedLedgerEntryData.Data);
                    break;
                }
            }