Esempio n. 1
0
 public override void DeserializeBody(BinaryReader br)
 {
     Flags        = br.ReadInt32();
     Left         = (Flags & 1) != 0;
     UserId       = br.ReadInt32();
     KickedBy     = br.ReadInt32();
     Date         = br.ReadInt32();
     BannedRights = (TLChannelBannedRights)ObjectUtils.DeserializeObject(br);
 }
Esempio n. 2
0
        public override void DeserializeBody(BinaryReader br)
        {
            Flags      = br.ReadInt32();
            Creator    = (Flags & 1) != 0;
            Left       = (Flags & 4) != 0;
            Editor     = (Flags & 8) != 0;
            Broadcast  = (Flags & 32) != 0;
            Verified   = (Flags & 128) != 0;
            Megagroup  = (Flags & 256) != 0;
            Restricted = (Flags & 512) != 0;
            Democracy  = (Flags & 1024) != 0;
            Signatures = (Flags & 2048) != 0;
            Min        = (Flags & 4096) != 0;
            Id         = br.ReadInt32();
            if ((Flags & 8192) != 0)
            {
                AccessHash = br.ReadInt64();
            }
            else
            {
                AccessHash = null;
            }

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

            Photo   = (TLAbsChatPhoto)ObjectUtils.DeserializeObject(br);
            Date    = br.ReadInt32();
            Version = br.ReadInt32();
            if ((Flags & 512) != 0)
            {
                RestrictionReason = StringUtil.Deserialize(br);
            }
            else
            {
                RestrictionReason = null;
            }

            if ((Flags & 16384) != 0)
            {
                AdminRights = (TLChannelAdminRights)ObjectUtils.DeserializeObject(br);
            }
            else
            {
                AdminRights = null;
            }

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