예제 #1
0
        public override void DeserializeBody(BinaryReader br)
        {
            Flags = br.ReadInt32();
            CanViewParticipants = (Flags & 8) != 0;
            CanSetUsername      = (Flags & 64) != 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;
            }

            ReadInboxMaxId  = br.ReadInt32();
            ReadOutboxMaxId = br.ReadInt32();
            UnreadCount     = br.ReadInt32();
            ChatPhoto       = (TLAbsPhoto)ObjectUtils.DeserializeObject(br);
            NotifySettings  = (TLAbsPeerNotifySettings)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;
            }
        }
예제 #2
0
 public override void SerializeBody(BinaryWriter bw)
 {
     bw.Write(Constructor);
     ObjectUtils.SerializeObject(Text, bw);
 }
예제 #3
0
 public override void DeserializeBody(BinaryReader br)
 {
     Text = (TLAbsRichText)ObjectUtils.DeserializeObject(br);
 }
예제 #4
0
 public override void DeserializeBody(BinaryReader br)
 {
     Set   = (TLStickerSet)ObjectUtils.DeserializeObject(br);
     Cover = (TLAbsDocument)ObjectUtils.DeserializeObject(br);
 }
예제 #5
0
 public override void DeserializeBody(BinaryReader br)
 {
     UserId      = br.ReadInt32();
     Description = StringUtil.Deserialize(br);
     Commands    = (TLVector <TLBotCommand>)ObjectUtils.DeserializeVector <TLBotCommand>(br);
 }
예제 #6
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;
            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;
            }
        }