コード例 #1
0
        public override TLObject FromStream(Stream input)
        {
            Flags             = GetObject <TLInt>(input);
            Currency          = GetObject <TLString>(input);
            TotalAmount       = GetObject <TLLong>(input);
            Payload           = GetObject <TLString>(input);
            _info             = GetObject <TLPaymentRequestedInfo>(Flags, (int)MessageActionPaymentSentMeFlags.Info, null, input);
            _shippingOptionId = GetObject <TLString>(Flags, (int)MessageActionPaymentSentMeFlags.ShippingOptionId, null, input);
            Charge            = GetObject <TLPaymentCharge>(input);

            return(this);
        }
コード例 #2
0
        public override TLObject FromBytes(byte[] bytes, ref int position)
        {
            bytes.ThrowExceptionIfIncorrect(ref position, Signature);

            Flags             = GetObject <TLInt>(bytes, ref position);
            Currency          = GetObject <TLString>(bytes, ref position);
            TotalAmount       = GetObject <TLLong>(bytes, ref position);
            Payload           = GetObject <TLString>(bytes, ref position);
            _info             = GetObject <TLPaymentRequestedInfo>(Flags, (int)MessageActionPaymentSentMeFlags.Info, null, bytes, ref position);
            _shippingOptionId = GetObject <TLString>(Flags, (int)MessageActionPaymentSentMeFlags.ShippingOptionId, null, bytes, ref position);
            Charge            = GetObject <TLPaymentCharge>(bytes, ref position);

            return(this);
        }
コード例 #3
0
        public override void Update(TLMessageActionBase action)
        {
            var actionPaymentSentMe = action as TLMessageActionPaymentSentMe;

            if (actionPaymentSentMe != null)
            {
                Currency         = actionPaymentSentMe.Currency;
                TotalAmount      = actionPaymentSentMe.TotalAmount;
                Payload          = actionPaymentSentMe.Payload;
                Info             = actionPaymentSentMe.Info;
                ShippingOptionId = actionPaymentSentMe.ShippingOptionId;
                Charge           = actionPaymentSentMe.Charge;
            }
        }