コード例 #1
0
 public override void DeserializeBody(BinaryReader br)
 {
     Rows = (TLVector <TLKeyboardButtonRow>)ObjectUtils.DeserializeVector <TLKeyboardButtonRow>(br);
 }
コード例 #2
0
ファイル: TLBotInfo.cs プロジェクト: telewear/TgSharp
 public override void DeserializeBody(BinaryReader br)
 {
     UserId      = br.ReadInt32();
     Description = StringUtil.Deserialize(br);
     Commands    = (TLVector <TLBotCommand>)ObjectUtils.DeserializeVector <TLBotCommand>(br);
 }
コード例 #3
0
 public override void DeserializeBody(BinaryReader br)
 {
     Values      = (TLVector <TLSecureValue>)ObjectUtils.DeserializeVector <TLSecureValue>(br);
     Credentials = (TLSecureCredentialsEncrypted)ObjectUtils.DeserializeObject(br);
 }
コード例 #4
0
ファイル: TLUpdateDcOptions.cs プロジェクト: telewear/TgSharp
 public override void DeserializeBody(BinaryReader br)
 {
     DcOptions = (TLVector <TLDcOption>)ObjectUtils.DeserializeVector <TLDcOption>(br);
 }
コード例 #5
0
 public override void DeserializeBody(BinaryReader br)
 {
     Users = (TLVector <TLAbsInputUser>)ObjectUtils.DeserializeVector <TLAbsInputUser>(br);
 }
コード例 #6
0
 public override void DeserializeBody(BinaryReader br)
 {
     Id     = StringUtil.Deserialize(br);
     Title  = StringUtil.Deserialize(br);
     Prices = (TLVector <TLLabeledPrice>)ObjectUtils.DeserializeVector <TLLabeledPrice>(br);
 }
コード例 #7
0
        public override void DeserializeBody(BinaryReader br)
        {
            Flags         = br.ReadInt32();
            Out           = (Flags & 2) != 0;
            Mentioned     = (Flags & 16) != 0;
            MediaUnread   = (Flags & 32) != 0;
            Silent        = (Flags & 8192) != 0;
            Post          = (Flags & 16384) != 0;
            FromScheduled = (Flags & 262144) != 0;
            Legacy        = (Flags & 524288) != 0;
            EditHide      = (Flags & 2097152) != 0;
            Id            = br.ReadInt32();
            if ((Flags & 256) != 0)
            {
                FromId = br.ReadInt32();
            }
            else
            {
                FromId = null;
            }

            ToId = (TLAbsPeer)ObjectUtils.DeserializeObject(br);
            if ((Flags & 4) != 0)
            {
                FwdFrom = (TLMessageFwdHeader)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                FwdFrom = null;
            }

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

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

            Date    = br.ReadInt32();
            Message = StringUtil.Deserialize(br);
            if ((Flags & 512) != 0)
            {
                Media = (TLAbsMessageMedia)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                Media = null;
            }

            if ((Flags & 64) != 0)
            {
                ReplyMarkup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                ReplyMarkup = 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)
            {
                EditDate = br.ReadInt32();
            }
            else
            {
                EditDate = null;
            }

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

            if ((Flags & 131072) != 0)
            {
                GroupedId = br.ReadInt64();
            }
            else
            {
                GroupedId = null;
            }

            if ((Flags & 4194304) != 0)
            {
                RestrictionReason = (TLVector <TLRestrictionReason>)ObjectUtils.DeserializeVector <TLRestrictionReason>(br);
            }
            else
            {
                RestrictionReason = null;
            }
        }
コード例 #8
0
ファイル: TLEmojiKeyword.cs プロジェクト: telewear/TgSharp
 public override void DeserializeBody(BinaryReader br)
 {
     Keyword   = StringUtil.Deserialize(br);
     Emoticons = (TLVector <string>)ObjectUtils.DeserializeVector <string>(br);
 }
コード例 #9
0
 public override void DeserializeBody(BinaryReader br)
 {
     Flags = br.ReadInt32();
     ExcludeNewMessages = (Flags & 2) != 0;
     Ranges             = (TLVector <TLMessageRange>)ObjectUtils.DeserializeVector <TLMessageRange>(br);
 }
コード例 #10
0
 public override void DeserializeBody(BinaryReader br)
 {
     Items = (TLVector <TLAbsPageListOrderedItem>)ObjectUtils.DeserializeVector <TLAbsPageListOrderedItem>(br);
 }
コード例 #11
0
 public override void DeserializeBody(BinaryReader br)
 {
     Cells = (TLVector <TLPageTableCell>)ObjectUtils.DeserializeVector <TLPageTableCell>(br);
 }
コード例 #12
0
 public override void DeserializeBody(BinaryReader br)
 {
     Items   = (TLVector <TLAbsPageBlock>)ObjectUtils.DeserializeVector <TLAbsPageBlock>(br);
     Caption = (TLPageCaption)ObjectUtils.DeserializeObject(br);
 }
コード例 #13
0
 public override void DeserializeBody(BinaryReader br)
 {
     ChannelId = br.ReadInt32();
     Messages  = (TLVector <int>)ObjectUtils.DeserializeVector <int>(br);
 }
コード例 #14
0
 public override void DeserializeBody(BinaryReader br)
 {
     Chats = (TLVector <int>)ObjectUtils.DeserializeVector <int>(br);
 }
コード例 #15
0
ファイル: TLTextConcat.cs プロジェクト: telewear/TgSharp
 public override void DeserializeBody(BinaryReader br)
 {
     Texts = (TLVector <TLAbsRichText>)ObjectUtils.DeserializeVector <TLAbsRichText>(br);
 }
コード例 #16
0
 public override void DeserializeBody(BinaryReader br)
 {
     MsgIds = (TLVector <long>)ObjectUtils.DeserializeVector <long>(br);
     Query  = (TLObject)ObjectUtils.DeserializeObject(br);
 }
コード例 #17
0
ファイル: TLChannelFull.cs プロジェクト: telewear/TgSharp
        public override void DeserializeBody(BinaryReader br)
        {
            Flags = br.ReadInt32();
            CanViewParticipants = (Flags & 8) != 0;
            CanSetUsername      = (Flags & 64) != 0;
            CanSetStickers      = (Flags & 128) != 0;
            HiddenPrehistory    = (Flags & 1024) != 0;
            CanViewStats        = (Flags & 4096) != 0;
            CanSetLocation      = (Flags & 65536) != 0;
            HasScheduled        = (Flags & 524288) != 0;
            Id    = br.ReadInt32();
            About = StringUtil.Deserialize(br);
            if ((Flags & 1) != 0)
            {
                ParticipantsCount = br.ReadInt32();
            }
            else
            {
                ParticipantsCount = null;
            }

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

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

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

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

            ReadInboxMaxId  = br.ReadInt32();
            ReadOutboxMaxId = br.ReadInt32();
            UnreadCount     = br.ReadInt32();
            ChatPhoto       = (TLAbsPhoto)ObjectUtils.DeserializeObject(br);
            NotifySettings  = (TLPeerNotifySettings)ObjectUtils.DeserializeObject(br);
            ExportedInvite  = (TLAbsExportedChatInvite)ObjectUtils.DeserializeObject(br);
            BotInfo         = (TLVector <TLBotInfo>)ObjectUtils.DeserializeVector <TLBotInfo>(br);
            if ((Flags & 16) != 0)
            {
                MigratedFromChatId = br.ReadInt32();
            }
            else
            {
                MigratedFromChatId = null;
            }

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

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

            if ((Flags & 256) != 0)
            {
                Stickerset = (TLStickerSet)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                Stickerset = null;
            }

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

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

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

            if ((Flags & 32768) != 0)
            {
                Location = (TLAbsChannelLocation)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                Location = null;
            }

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

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

            Pts = br.ReadInt32();
        }
コード例 #18
0
 public override void DeserializeBody(BinaryReader br)
 {
     Messages = (TLVector <int>)ObjectUtils.DeserializeVector <int>(br);
     Pts      = br.ReadInt32();
     PtsCount = br.ReadInt32();
 }
コード例 #19
0
ファイル: TLWebPage.cs プロジェクト: telewear/TgSharp
        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 = (TLPage)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                CachedPage = null;
            }

            if ((Flags & 4096) != 0)
            {
                // manual edit: WebPageAttribute->TLWebPageAttributeTheme
                Attributes = (TLVector <TLWebPageAttributeTheme>)ObjectUtils.DeserializeVector <TLWebPageAttributeTheme> (br);
            }
            else
            {
                Attributes = null;
            }
        }
コード例 #20
0
 public override void DeserializeBody(BinaryReader br)
 {
     Set    = (TLStickerSet)ObjectUtils.DeserializeObject(br);
     Covers = (TLVector <TLAbsDocument>)ObjectUtils.DeserializeVector <TLAbsDocument>(br);
 }
コード例 #21
0
ファイル: TLStickerPack.cs プロジェクト: Laiteux/TgSharp
 public override void DeserializeBody(BinaryReader br)
 {
     Emoticon  = StringUtil.Deserialize(br);
     Documents = (TLVector <long>)ObjectUtils.DeserializeVector <long>(br);
 }
コード例 #22
0
ファイル: TLUpdatePrivacy.cs プロジェクト: telewear/TgSharp
 public override void DeserializeBody(BinaryReader br)
 {
     Key   = (TLAbsPrivacyKey)ObjectUtils.DeserializeObject(br);
     Rules = (TLVector <TLAbsPrivacyRule>)ObjectUtils.DeserializeVector <TLAbsPrivacyRule>(br);
 }
コード例 #23
0
 public override void DeserializeBody(BinaryReader br)
 {
     Buttons = (TLVector <TLAbsKeyboardButton>)ObjectUtils.DeserializeVector <TLAbsKeyboardButton>(br);
 }