コード例 #1
0
 public static void Encode(XdrDataOutputStream stream, ClaimOfferAtom encodedClaimOfferAtom)
 {
     AccountID.Encode(stream, encodedClaimOfferAtom.SellerID);
     Int64.Encode(stream, encodedClaimOfferAtom.OfferID);
     Asset.Encode(stream, encodedClaimOfferAtom.AssetSold);
     Int64.Encode(stream, encodedClaimOfferAtom.AmountSold);
     Asset.Encode(stream, encodedClaimOfferAtom.AssetBought);
     Int64.Encode(stream, encodedClaimOfferAtom.AmountBought);
 }
コード例 #2
0
            public static void Encode(XdrDataOutputStream stream, PathPaymentResultSuccess encodedPathPaymentResultSuccess)
            {
                int offerssize = encodedPathPaymentResultSuccess.Offers.Length;

                stream.WriteInt(offerssize);
                for (int i = 0; i < offerssize; i++)
                {
                    ClaimOfferAtom.Encode(stream, encodedPathPaymentResultSuccess.Offers[i]);
                }
                SimplePaymentResult.Encode(stream, encodedPathPaymentResultSuccess.Last);
            }
コード例 #3
0
        public static void Encode(XdrDataOutputStream stream, ManageOfferSuccessResult encodedManageOfferSuccessResult)
        {
            int offersClaimedsize = encodedManageOfferSuccessResult.OffersClaimed.Length;

            stream.WriteInt(offersClaimedsize);
            for (int i = 0; i < offersClaimedsize; i++)
            {
                ClaimOfferAtom.Encode(stream, encodedManageOfferSuccessResult.OffersClaimed[i]);
            }
            ManageOfferSuccessResultOffer.Encode(stream, encodedManageOfferSuccessResult.Offer);
        }
コード例 #4
0
        public static ClaimOfferAtom Decode(XdrDataInputStream stream)
        {
            ClaimOfferAtom decodedClaimOfferAtom = new ClaimOfferAtom();

            decodedClaimOfferAtom.SellerID     = AccountID.Decode(stream);
            decodedClaimOfferAtom.OfferID      = Int64.Decode(stream);
            decodedClaimOfferAtom.AssetSold    = Asset.Decode(stream);
            decodedClaimOfferAtom.AmountSold   = Int64.Decode(stream);
            decodedClaimOfferAtom.AssetBought  = Asset.Decode(stream);
            decodedClaimOfferAtom.AmountBought = Int64.Decode(stream);
            return(decodedClaimOfferAtom);
        }
コード例 #5
0
            public static PathPaymentResultSuccess Decode(XdrDataInputStream stream)
            {
                PathPaymentResultSuccess decodedPathPaymentResultSuccess = new PathPaymentResultSuccess();
                int offerssize = stream.ReadInt();

                decodedPathPaymentResultSuccess.Offers = new ClaimOfferAtom[offerssize];
                for (int i = 0; i < offerssize; i++)
                {
                    decodedPathPaymentResultSuccess.Offers[i] = ClaimOfferAtom.Decode(stream);
                }
                decodedPathPaymentResultSuccess.Last = SimplePaymentResult.Decode(stream);
                return(decodedPathPaymentResultSuccess);
            }
コード例 #6
0
        public static ManageOfferSuccessResult Decode(XdrDataInputStream stream)
        {
            ManageOfferSuccessResult decodedManageOfferSuccessResult = new ManageOfferSuccessResult();
            int offersClaimedsize = stream.ReadInt();

            decodedManageOfferSuccessResult.OffersClaimed = new ClaimOfferAtom[offersClaimedsize];
            for (int i = 0; i < offersClaimedsize; i++)
            {
                decodedManageOfferSuccessResult.OffersClaimed[i] = ClaimOfferAtom.Decode(stream);
            }
            decodedManageOfferSuccessResult.Offer = ManageOfferSuccessResultOffer.Decode(stream);
            return(decodedManageOfferSuccessResult);
        }