Deserialize() public static method

public static Deserialize ( BinaryReader reader ) : string
reader System.IO.BinaryReader
return string
示例#1
0
 public override void DeserializeBody(BinaryReader br)
 {
     Key   = StringUtil.Deserialize(br);
     Value = (TLAbsJSONValue)ObjectUtils.DeserializeObject(br);
 }
示例#2
0
        public override void DeserializeBody(BinaryReader br)
        {
            this.Flags = br.ReadInt32();
            this.Id    = StringUtil.Deserialize(br);
            this.Type  = StringUtil.Deserialize(br);
            if ((this.Flags & 2) != 0)
            {
                this.Title = StringUtil.Deserialize(br);
            }
            else
            {
                this.Title = null;
            }

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

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

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

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

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

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

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

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

            this.SendMessage = (TLAbsBotInlineMessage)ObjectUtils.DeserializeObject(br);
        }
示例#3
0
        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);
        }
示例#4
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;
            }
        }
示例#5
0
 public override void DeserializeBody(BinaryReader br)
 {
     Type = StringUtil.Deserialize(br);
 }
示例#6
0
 public override void DeserializeBody(BinaryReader br)
 {
     Address = StringUtil.Deserialize(br);
     Port    = br.ReadInt32();
 }
示例#7
0
 public override void DeserializeBody(BinaryReader br)
 {
     command     = StringUtil.Deserialize(br);
     description = StringUtil.Deserialize(br);
     Type        = TLAbsBotCommandTypes.TLBotCommand;
 }
示例#8
0
        public override void DeserializeBody(BinaryReader br)
        {
            flags        = br.ReadInt32();
            @out         = (flags & 2) != 0;
            mentioned    = (flags & 16) != 0;
            media_unread = (flags & 32) != 0;
            silent       = (flags & 8192) != 0;
            post         = (flags & 16384) != 0;
            id           = br.ReadInt32();
            if ((flags & 256) != 0)
            {
                from_id = br.ReadInt32();
            }
            else
            {
                from_id = null;
            }

            to_id = (TLAbsPeer)ObjectUtils.DeserializeObject(br);
            if ((flags & 4) != 0)
            {
                fwd_from = (TLAbsMessageFwdHeader)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                fwd_from = null;
            }

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

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

            date    = br.ReadInt32();
            message = StringUtil.Deserialize(br);
            if ((flags & 512) != 0)
            {
                media = (TLAbsMessageMedia)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                media = null;
            }

            if ((flags & 64) != 0)
            {
                reply_markup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                reply_markup = null;
            }

            if ((flags & 128) != 0)
            {
                entities = (TLVector <TLAbsMessageEntity>)ObjectUtils.DeserializeVector <TLAbsMessageEntity>(br);
            }
            else
            {
                entities = null;
            }

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

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

            Type = TLAbsMessageTypes.TLMessage;
        }
示例#9
0
 public override void DeserializeBody(BinaryReader br)
 {
     text = StringUtil.Deserialize(br);
     Type = TLAbsKeyboardButtonTypes.TLKeyboardButtonGame;
 }
示例#10
0
 public override void DeserializeBody(BinaryReader br)
 {
     user_id = br.ReadInt32();
     phone   = StringUtil.Deserialize(br);
 }
示例#11
0
        public override void DeserializeBody(BinaryReader br)
        {
            flags = br.ReadInt32();
            can_view_participants = (flags & 8) != 0;
            can_set_username      = (flags & 64) != 0;
            id    = br.ReadInt32();
            about = StringUtil.Deserialize(br);
            if ((flags & 1) != 0)
            {
                participants_count = br.ReadInt32();
            }
            else
            {
                participants_count = null;
            }

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

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

            read_inbox_max_id  = br.ReadInt32();
            read_outbox_max_id = br.ReadInt32();
            unread_count       = br.ReadInt32();
            chat_photo         = (TLAbsPhoto)ObjectUtils.DeserializeObject(br);
            notify_settings    = (TLAbsPeerNotifySettings)ObjectUtils.DeserializeObject(br);
            exported_invite    = (TLAbsExportedChatInvite)ObjectUtils.DeserializeObject(br);
            bot_info           = (TLVector <TLBotInfo>)ObjectUtils.DeserializeVector <TLBotInfo>(br);
            if ((flags & 16) != 0)
            {
                migrated_from_chat_id = br.ReadInt32();
            }
            else
            {
                migrated_from_chat_id = null;
            }

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

            if ((flags & 32) != 0)
            {
                pinned_msg_id = br.ReadInt32();
            }
            else
            {
                pinned_msg_id = null;
            }
        }
示例#12
0
 public override void DeserializeBody(BinaryReader br)
 {
     this.Text     = (TLAbsRichText)ObjectUtils.DeserializeObject(br);
     this.Language = StringUtil.Deserialize(br);
 }
示例#13
0
 public override void DeserializeBody(BinaryReader br)
 {
     this.Url     = StringUtil.Deserialize(br);
     this.Caption = StringUtil.Deserialize(br);
 }
 public override void DeserializeBody(BinaryReader br)
 {
     Title  = StringUtil.Deserialize(br);
     ChatId = br.ReadInt32();
 }
示例#15
0
 public override void DeserializeBody(BinaryReader br)
 {
     DcId      = br.ReadInt32();
     PublicKey = StringUtil.Deserialize(br);
 }
示例#16
0
 public override void DeserializeBody(BinaryReader br)
 {
     Platform = StringUtil.Deserialize(br);
     Reason   = StringUtil.Deserialize(br);
     Text     = StringUtil.Deserialize(br);
 }
示例#17
0
 public override void DeserializeBody(BinaryReader br)
 {
     bot_id     = (TLAbsInputUser)ObjectUtils.DeserializeObject(br);
     short_name = StringUtil.Deserialize(br);
     Type       = TLAbsInputGameTypes.TLInputGameShortName;
 }
示例#18
0
 public override void DeserializeBody(BinaryReader br)
 {
     this.Label  = StringUtil.Deserialize(br);
     this.Amount = br.ReadInt64();
 }
示例#19
0
 public override void DeserializeBody(BinaryReader br)
 {
     Text   = StringUtil.Deserialize(br);
     Option = BytesUtil.Deserialize(br);
 }
示例#20
0
 public override void DeserializeBody(BinaryReader br)
 {
     this.FileName = StringUtil.Deserialize(br);
 }
 public override void DeserializeBody(BinaryReader br)
 {
     Currency    = StringUtil.Deserialize(br);
     TotalAmount = br.ReadInt64();
 }
示例#22
0
 public override void DeserializeBody(BinaryReader br)
 {
     offset   = br.ReadInt32();
     length   = br.ReadInt32();
     language = StringUtil.Deserialize(br);
 }
示例#23
0
        public override void DeserializeBody(BinaryReader br)
        {
            Flags          = br.ReadInt32();
            Self           = (Flags & 1024) != 0;
            Contact        = (Flags & 2048) != 0;
            MutualContact  = (Flags & 4096) != 0;
            Deleted        = (Flags & 8192) != 0;
            Bot            = (Flags & 16384) != 0;
            BotChatHistory = (Flags & 32768) != 0;
            BotNochats     = (Flags & 65536) != 0;
            Verified       = (Flags & 131072) != 0;
            Restricted     = (Flags & 262144) != 0;
            Min            = (Flags & 1048576) != 0;
            BotInlineGeo   = (Flags & 2097152) != 0;
            Id             = br.ReadInt32();
            if ((Flags & 1) != 0)
            {
                AccessHash = br.ReadInt64();
            }
            else
            {
                AccessHash = null;
            }

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

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

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

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

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

            if ((Flags & 64) != 0)
            {
                Status = (TLAbsUserStatus)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                Status = null;
            }

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

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

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

            if ((Flags & 4194304) != 0)
            {
                LangCode = StringUtil.Deserialize(br);
            }
            else
            {
                LangCode = null;
            }
        }
示例#24
0
 public override void DeserializeBody(BinaryReader br)
 {
     PhoneNumber = StringUtil.Deserialize(br);
     FirstName   = StringUtil.Deserialize(br);
     LastName    = StringUtil.Deserialize(br);
 }
示例#25
0
 public override void DeserializeBody(BinaryReader br)
 {
     Document = (TLAbsDocument)ObjectUtils.DeserializeObject(br);
     Caption  = StringUtil.Deserialize(br);
 }
示例#26
0
 public override void DeserializeBody(BinaryReader br)
 {
     id     = StringUtil.Deserialize(br);
     title  = StringUtil.Deserialize(br);
     prices = (TLVector <TLLabeledPrice>)ObjectUtils.DeserializeVector <TLLabeledPrice>(br);
 }