Example #1
0
        public override void DeserializeBody(BinaryReader br)
        {
            Flags      = br.ReadInt32();
            Id         = br.ReadInt64();
            Url        = StringUtil.Deserialize(br);
            DisplayUrl = StringUtil.Deserialize(br);
            Hash       = br.ReadInt32();
            if ((Flags & 1) != 0)
            {
                Type = StringUtil.Deserialize(br);
            }
            else
            {
                Type = null;
            }

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

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

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

            if ((Flags & 16) != 0)
            {
                Photo = (TLAbsPhoto)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                Photo = null;
            }

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

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

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

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

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

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

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

            if ((Flags & 1024) != 0)
            {
                CachedPage = (TLAbsPage)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                CachedPage = null;
            }
        }
Example #2
0
        public override void DeserializeBody(BinaryReader br)
        {
            flags       = br.ReadInt32();
            id          = br.ReadInt64();
            url         = StringUtil.Deserialize(br);
            display_url = StringUtil.Deserialize(br);
            hash        = br.ReadInt32();
            if ((flags & 1) != 0)
            {
                type = StringUtil.Deserialize(br);
            }
            else
            {
                type = null;
            }

            if ((flags & 2) != 0)
            {
                site_name = StringUtil.Deserialize(br);
            }
            else
            {
                site_name = null;
            }

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

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

            if ((flags & 16) != 0)
            {
                photo = (TLAbsPhoto)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                photo = null;
            }

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

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

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

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

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

            if ((flags & 256) != 0)
            {
                author = StringUtil.Deserialize(br);
            }
            else
            {
                author = null;
            }

            if ((flags & 512) != 0)
            {
                document = (TLAbsDocument)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                document = null;
            }

            if ((flags & 1024) != 0)
            {
                cached_page = (TLAbsPage)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                cached_page = null;
            }

            Type = TLAbsWebPageTypes.TLWebPage;
        }
Example #3
0
        public override void DeserializeBody(BinaryReader br)
        {
            this.Flags      = br.ReadInt32();
            this.Id         = br.ReadInt64();
            this.Url        = StringUtil.Deserialize(br);
            this.DisplayUrl = StringUtil.Deserialize(br);
            this.Hash       = br.ReadInt32();
            if ((this.Flags & 1) != 0)
            {
                this.Type = StringUtil.Deserialize(br);
            }
            else
            {
                this.Type = null;
            }

            if ((this.Flags & 2) != 0)
            {
                this.SiteName = StringUtil.Deserialize(br);
            }
            else
            {
                this.SiteName = null;
            }

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

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

            if ((this.Flags & 16) != 0)
            {
                this.Photo = (TLAbsPhoto)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                this.Photo = null;
            }

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

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

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

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

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

            if ((this.Flags & 256) != 0)
            {
                this.Author = StringUtil.Deserialize(br);
            }
            else
            {
                this.Author = null;
            }

            if ((this.Flags & 512) != 0)
            {
                this.Document = (TLAbsDocument)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                this.Document = null;
            }

            if ((this.Flags & 1024) != 0)
            {
                this.CachedPage = (TLAbsPage)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                this.CachedPage = null;
            }
        }