Exemple #1
0
        public override void DeserializeBody(BinaryReader br)
        {
            Flags = br.ReadInt32();
            Id    = StringUtil.Deserialize(br);
            Type  = StringUtil.Deserialize(br);
            if ((Flags & 1) != 0)
            {
                Photo = (TlAbsPhoto)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                Photo = null;
            }

            if ((Flags & 2) != 0)
            {
                Document = (TlAbsDocument)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                Document = null;
            }

            if ((Flags & 4) != 0)
            {
                Title = StringUtil.Deserialize(br);
            }
            else
            {
                Title = null;
            }

            if ((Flags & 8) != 0)
            {
                Description = StringUtil.Deserialize(br);
            }
            else
            {
                Description = null;
            }

            SendMessage = (TlAbsBotInlineMessage)ObjectUtils.DeserializeObject(br);
        }
        public override void DeserializeBody(BinaryReader br)
        {
            Flags = br.ReadInt32();
            Id    = StringUtil.Deserialize(br);
            Type  = StringUtil.Deserialize(br);
            if ((Flags & 2) != 0)
            {
                Title = StringUtil.Deserialize(br);
            }
            else
            {
                Title = null;
            }

            if ((Flags & 4) != 0)
            {
                Description = StringUtil.Deserialize(br);
            }
            else
            {
                Description = null;
            }

            if ((Flags & 8) != 0)
            {
                Url = StringUtil.Deserialize(br);
            }
            else
            {
                Url = null;
            }

            if ((Flags & 16) != 0)
            {
                ThumbUrl = StringUtil.Deserialize(br);
            }
            else
            {
                ThumbUrl = null;
            }

            if ((Flags & 32) != 0)
            {
                ContentUrl = StringUtil.Deserialize(br);
            }
            else
            {
                ContentUrl = null;
            }

            if ((Flags & 32) != 0)
            {
                ContentType = StringUtil.Deserialize(br);
            }
            else
            {
                ContentType = null;
            }

            if ((Flags & 64) != 0)
            {
                W = br.ReadInt32();
            }
            else
            {
                W = null;
            }

            if ((Flags & 64) != 0)
            {
                H = br.ReadInt32();
            }
            else
            {
                H = null;
            }

            if ((Flags & 128) != 0)
            {
                Duration = br.ReadInt32();
            }
            else
            {
                Duration = null;
            }

            SendMessage = (TlAbsBotInlineMessage)ObjectUtils.DeserializeObject(br);
        }