public override void Read(BinaryReader reader)
        {
            reader.ReadInt32(); // vector code
            int messages_len = reader.ReadInt32();

            this.messages = new List <Message>(messages_len);
            for (int messages_index = 0; messages_index < messages_len; messages_index++)
            {
                Message messages_element;
                messages_element = Tl.Parse <Message>(reader);
                this.messages.Add(messages_element);
            }
            reader.ReadInt32(); // vector code
            int chats_len = reader.ReadInt32();

            this.chats = new List <Chat>(chats_len);
            for (int chats_index = 0; chats_index < chats_len; chats_index++)
            {
                Chat chats_element;
                chats_element = Tl.Parse <Chat>(reader);
                this.chats.Add(chats_element);
            }
            reader.ReadInt32(); // vector code
            int users_len = reader.ReadInt32();

            this.users = new List <User>(users_len);
            for (int users_index = 0; users_index < users_len; users_index++)
            {
                User users_element;
                users_element = Tl.Parse <User>(reader);
                this.users.Add(users_element);
            }
        }
示例#2
0
 public override void Read(BinaryReader reader)
 {
     this.id              = reader.ReadInt32();
     this.participants    = Tl.Parse <ChatParticipants>(reader);
     this.chat_photo      = Tl.Parse <Photo>(reader);
     this.notify_settings = Tl.Parse <PeerNotifySettings>(reader);
 }
示例#3
0
 public override void Read(BinaryReader reader)
 {
     this.user_id  = reader.ReadInt32();
     this.date     = reader.ReadInt32();
     this.photo    = Tl.Parse <UserProfilePhoto>(reader);
     this.previous = reader.ReadUInt32() == 0x997275b5;
 }
        public override void Read(BinaryReader reader)
        {
            this.message = Tl.Parse <Message>(reader);
            reader.ReadInt32(); // vector code
            int chats_len = reader.ReadInt32();

            this.chats = new List <Chat>(chats_len);
            for (int chats_index = 0; chats_index < chats_len; chats_index++)
            {
                Chat chats_element;
                chats_element = Tl.Parse <Chat>(reader);
                this.chats.Add(chats_element);
            }

            /*
             *          reader.ReadInt32(); // vector code
             *          int users_len = reader.ReadInt32();
             *          this.users = new List<User>(users_len);
             *          for (int users_index = 0; users_index < users_len; users_index++)
             *          {
             *                  User users_element;
             *                  users_element = TL.Parse<User>(reader);
             *                  this.users.Add(users_element);
             *          }
             *          this.pts = reader.ReadInt32();
             *          this.seq = reader.ReadInt32();
             */
        }
示例#5
0
 public override void Read(BinaryReader reader)
 {
     this.file     = Tl.Parse <InputFile>(reader);
     this.duration = reader.ReadInt32();
     this.w        = reader.ReadInt32();
     this.h        = reader.ReadInt32();
 }
示例#6
0
 public override void Read(BinaryReader reader)
 {
     this.file      = Tl.Parse <InputFile>(reader);
     this.thumb     = Tl.Parse <InputFile>(reader);
     this.file_name = Serializers.String.read(reader);
     this.mime_type = Serializers.String.read(reader);
 }
示例#7
0
 public override void Read(BinaryReader reader)
 {
     this.random_id    = reader.ReadInt64();
     this.random_bytes = Serializers.Bytes.read(reader);
     this.message      = Serializers.String.read(reader);
     this.media        = Tl.Parse <DecryptedMessageMedia>(reader);
 }
示例#8
0
        public override void Read(BinaryReader reader)
        {
            reader.ReadInt32(); // vector code
            int updates_len = reader.ReadInt32();

            this.updates = new List <Update>(updates_len);
            for (int updates_index = 0; updates_index < updates_len; updates_index++)
            {
                Update updates_element;
                updates_element = Tl.Parse <Update>(reader);
                this.updates.Add(updates_element);
            }
            reader.ReadInt32(); // vector code
            int users_len = reader.ReadInt32();

            this.users = new List <User>(users_len);
            for (int users_index = 0; users_index < users_len; users_index++)
            {
                User users_element;
                users_element = Tl.Parse <User>(reader);
                this.users.Add(users_element);
            }
            reader.ReadInt32(); // vector code
            int chats_len = reader.ReadInt32();

            this.chats = new List <Chat>(chats_len);
            for (int chats_index = 0; chats_index < chats_len; chats_index++)
            {
                Chat chats_element;
                chats_element = Tl.Parse <Chat>(reader);
                this.chats.Add(chats_element);
            }
            this.date = reader.ReadInt32();
            this.seq  = reader.ReadInt32();
        }
示例#9
0
        public override void Read(BinaryReader reader)
        {
            //document#f9a39f4f id:long access_hash:long date:int mime_type:string size:int thumb:PhotoSize dc_id:int attributes:Vector<DocumentAttribute> = Document;

            this.id          = reader.ReadInt64();
            this.access_hash = reader.ReadInt64();
            this.date        = reader.ReadInt32();
            this.mime_type   = Serializers.String.read(reader);
            this.size        = reader.ReadInt32();
            this.thumb       = Tl.Parse <PhotoSize>(reader);
            this.dc_id       = reader.ReadInt32();

            // Vector
            var vectorCode = reader.ReadInt32();
            var vectorSize = reader.ReadInt32();

            var documentAttributes = new List <DocumentAttribute>();

            for (var index = 0; index < vectorSize; index++)
            {
                var attribute = Tl.Parse <DocumentAttribute>(reader);

                documentAttributes.Add(attribute);
            }
        }
示例#10
0
 public override void Read(BinaryReader reader)
 {
     this.type     = Serializers.String.read(reader);
     this.location = Tl.Parse <FileLocation>(reader);
     this.w        = reader.ReadInt32();
     this.h        = reader.ReadInt32();
     this.bytes    = Serializers.Bytes.read(reader);
 }
示例#11
0
 public override void Read(BinaryReader reader)
 {
     this.random_id = reader.ReadInt64();
     this.chat_id   = reader.ReadInt32();
     this.date      = reader.ReadInt32();
     this.bytes     = Serializers.Bytes.read(reader);
     this.file      = Tl.Parse <EncryptedFile>(reader);
 }
 public override void Read(BinaryReader reader)
 {
     this.chat_id = reader.ReadInt32();
     this.id      = reader.ReadInt32();
     this.from_id = reader.ReadInt32();
     this.date    = reader.ReadInt32();
     this.action  = Tl.Parse <MessageAction>(reader);
 }
示例#13
0
 public override void Read(BinaryReader reader)
 {
     this.chat_id = reader.ReadInt32();
     this.id      = reader.ReadInt32();
     this.from_id = reader.ReadInt32();
     this.date    = reader.ReadInt32();
     this.message = Serializers.String.read(reader);
     this.media   = Tl.Parse <MessageMedia>(reader);
 }
示例#14
0
 public override void Read(BinaryReader reader)
 {
     this.id          = reader.ReadInt32();
     this.first_name  = Serializers.String.read(reader);
     this.last_name   = Serializers.String.read(reader);
     this.access_hash = reader.ReadInt64();
     this.photo       = Tl.Parse <UserProfilePhoto>(reader);
     this.status      = Tl.Parse <UserStatus>(reader);
 }
        public override void Read(BinaryReader reader)
        {
            reader.ReadInt32(); // vector code
            int new_messages_len = reader.ReadInt32();

            this.new_messages = new List <Message>(new_messages_len);
            for (int new_messages_index = 0; new_messages_index < new_messages_len; new_messages_index++)
            {
                Message new_messages_element;
                new_messages_element = Tl.Parse <Message>(reader);
                this.new_messages.Add(new_messages_element);
            }
            reader.ReadInt32(); // vector code
            int new_encrypted_messages_len = reader.ReadInt32();

            this.new_encrypted_messages = new List <EncryptedMessage>(new_encrypted_messages_len);
            for (int new_encrypted_messages_index = 0;
                 new_encrypted_messages_index < new_encrypted_messages_len;
                 new_encrypted_messages_index++)
            {
                EncryptedMessage new_encrypted_messages_element;
                new_encrypted_messages_element = Tl.Parse <EncryptedMessage>(reader);
                this.new_encrypted_messages.Add(new_encrypted_messages_element);
            }
            reader.ReadInt32(); // vector code
            int other_updates_len = reader.ReadInt32();

            this.other_updates = new List <Update>(other_updates_len);
            for (int other_updates_index = 0; other_updates_index < other_updates_len; other_updates_index++)
            {
                Update other_updates_element;
                other_updates_element = Tl.Parse <Update>(reader);
                this.other_updates.Add(other_updates_element);
            }
            reader.ReadInt32(); // vector code
            int chats_len = reader.ReadInt32();

            this.chats = new List <Chat>(chats_len);
            for (int chats_index = 0; chats_index < chats_len; chats_index++)
            {
                Chat chats_element;
                chats_element = Tl.Parse <Chat>(reader);
                this.chats.Add(chats_element);
            }
            reader.ReadInt32(); // vector code
            int users_len = reader.ReadInt32();

            this.users = new List <User>(users_len);
            for (int users_index = 0; users_index < users_len; users_index++)
            {
                User users_element;
                users_element = Tl.Parse <User>(reader);
                this.users.Add(users_element);
            }
            this.state = Tl.Parse <updates_State>(reader);
        }
 public override void Read(BinaryReader reader)
 {
     this.id      = reader.ReadInt32();
     this.from_id = reader.ReadInt32();
     this.to_id   = Tl.Parse <Peer>(reader);
     this.output  = reader.ReadUInt32() == 0x997275b5;
     this.unread  = reader.ReadUInt32() == 0x997275b5;
     this.date    = reader.ReadInt32();
     this.action  = Tl.Parse <MessageAction>(reader);
 }
示例#17
0
 static TlObjectReaderCommon()
 {
     _readFunctions = new Dictionary <Type, Func <BinaryReader, object> >
     {
         [typeof(int)]          = reader => reader.ReadInt32(),
         [typeof(string)]       = reader => Serializers.String.read(reader),
         [typeof(Peer)]         = reader => Tl.Parse <Peer>(reader),
         [typeof(MessageMedia)] = reader => Tl.Parse <MessageMedia>(reader)
     };
 }
示例#18
0
 public override void Read(BinaryReader reader)
 {
     this.id    = reader.ReadInt32();
     this.title = Serializers.String.read(reader);
     this.photo = Tl.Parse <ChatPhoto>(reader);
     this.participants_count = reader.ReadInt32();
     this.date    = reader.ReadInt32();
     this.left    = reader.ReadUInt32() == 0x997275b5;
     this.version = reader.ReadInt32();
 }
示例#19
0
 public override void Read(BinaryReader reader)
 {
     this.user            = Tl.Parse <User>(reader);
     this.link            = Tl.Parse <contacts_Link>(reader);
     this.profile_photo   = Tl.Parse <Photo>(reader);
     this.notify_settings = Tl.Parse <PeerNotifySettings>(reader);
     this.blocked         = reader.ReadUInt32() == 0x997275b5;
     this.real_first_name = Serializers.String.read(reader);
     this.real_last_name  = Serializers.String.read(reader);
 }
        public override void Read(BinaryReader reader)
        {
            reader.ReadInt32(); // vector code
            int dc_options_len = reader.ReadInt32();

            this.dc_options = new List <DcOption>(dc_options_len);
            for (int dc_options_index = 0; dc_options_index < dc_options_len; dc_options_index++)
            {
                DcOption dc_options_element;
                dc_options_element = Tl.Parse <DcOption>(reader);
                this.dc_options.Add(dc_options_element);
            }
        }
        public override void Read(BinaryReader reader)
        {
            // userContact#cab35e18 id:int first_name:string last_name:string username:string access_hash:long phone:string photo:UserProfilePhoto status:UserStatus = User;

            this.id          = reader.ReadInt32();
            this.first_name  = Serializers.String.read(reader);
            this.last_name   = Serializers.String.read(reader);
            this.Username    = Serializers.String.read(reader);
            this.access_hash = reader.ReadInt64();
            this.phone       = Serializers.String.read(reader);
            this.photo       = Tl.Parse <UserProfilePhoto>(reader);
            this.status      = Tl.Parse <UserStatus>(reader);
        }
示例#22
0
 public override void Read(BinaryReader reader)
 {
     this.id          = reader.ReadInt32();
     this.fwd_from_id = reader.ReadInt32();
     this.fwd_date    = reader.ReadInt32();
     this.from_id     = reader.ReadInt32();
     this.to_id       = reader.ReadInt32();
     this.output      = reader.ReadUInt32() == 0x997275b5;
     this.unread      = reader.ReadUInt32() == 0x997275b5;
     this.date        = reader.ReadInt32();
     this.message     = Serializers.String.read(reader);
     this.media       = Tl.Parse <MessageMedia>(reader);
 }
示例#23
0
 public override void Read(BinaryReader reader)
 {
     this.id                 = reader.ReadInt32();
     this.access_hash        = reader.ReadInt64();
     this.title              = Serializers.String.read(reader);
     this.address            = Serializers.String.read(reader);
     this.venue              = Serializers.String.read(reader);
     this.geo                = Tl.Parse <GeoPoint>(reader);
     this.photo              = Tl.Parse <ChatPhoto>(reader);
     this.participants_count = reader.ReadInt32();
     this.date               = reader.ReadInt32();
     this.checked_in         = reader.ReadUInt32() == 0x997275b5;
     this.version            = reader.ReadInt32();
 }
示例#24
0
        public override void Read(BinaryReader reader)
        {
            this.photo = Tl.Parse <Photo>(reader);
            reader.ReadInt32(); // vector code
            int users_len = reader.ReadInt32();

            this.users = new List <User>(users_len);
            for (int users_index = 0; users_index < users_len; users_index++)
            {
                User users_element;
                users_element = Tl.Parse <User>(reader);
                this.users.Add(users_element);
            }
        }
        public override void Read(BinaryReader reader)
        {
            this.chat_id  = reader.ReadInt32();
            this.admin_id = reader.ReadInt32();
            reader.ReadInt32(); // vector code
            int participants_len = reader.ReadInt32();

            this.participants = new List <ChatParticipant>(participants_len);
            for (int participants_index = 0; participants_index < participants_len; participants_index++)
            {
                ChatParticipant participants_element;
                participants_element = Tl.Parse <ChatParticipant>(reader);
                this.participants.Add(participants_element);
            }
            this.version = reader.ReadInt32();
        }
        public override void Read(BinaryReader reader)
        {
            this.id    = reader.ReadInt32();
            this.title = Serializers.String.read(reader);
            reader.ReadInt32(); // vector code
            int sizes_len = reader.ReadInt32();

            this.sizes = new List <PhotoSize>(sizes_len);
            for (int sizes_index = 0; sizes_index < sizes_len; sizes_index++)
            {
                PhotoSize sizes_element;
                sizes_element = Tl.Parse <PhotoSize>(reader);
                this.sizes.Add(sizes_element);
            }
            this.color = reader.ReadInt32();
        }
        public override void Read(BinaryReader reader)
        {
            this.id   = reader.ReadInt32();
            this.date = reader.ReadInt32();
            this.pts  = reader.ReadInt32();
            this.seq  = reader.ReadInt32();
            reader.ReadInt32(); // vector code
            int links_len = reader.ReadInt32();

            this.links = new List <contacts_Link>(links_len);
            for (int links_index = 0; links_index < links_len; links_index++)
            {
                contacts_Link links_element;
                links_element = Tl.Parse <contacts_Link>(reader);
                this.links.Add(links_element);
            }
        }
示例#28
0
        public override void Read(BinaryReader reader)
        {
            //video#388fa391 id:long access_hash:long user_id:int date:int caption:string duration:int mime_type:string size:int thumb:PhotoSize dc_id:int w:int h:int = Video;

            this.id          = reader.ReadInt64();
            this.access_hash = reader.ReadInt64();
            this.user_id     = reader.ReadInt32();
            this.date        = reader.ReadInt32();
            this.caption     = Serializers.String.read(reader);
            this.duration    = reader.ReadInt32();
            this.mime_type   = Serializers.String.read(reader);
            this.size        = reader.ReadInt32();
            this.thumb       = Tl.Parse <PhotoSize>(reader);
            this.dc_id       = reader.ReadInt32();
            this.w           = reader.ReadInt32();
            this.h           = reader.ReadInt32();
        }
示例#29
0
        public override void Read(BinaryReader reader)
        {
            this.id          = reader.ReadInt64();
            this.access_hash = reader.ReadInt64();
            this.user_id     = reader.ReadInt32();
            this.date        = reader.ReadInt32();
            this.caption     = Serializers.String.read(reader);
            this.geo         = Tl.Parse <GeoPoint>(reader);
            reader.ReadInt32(); // vector code
            int sizes_len = reader.ReadInt32();

            this.sizes = new List <PhotoSize>(sizes_len);
            for (int sizes_index = 0; sizes_index < sizes_len; sizes_index++)
            {
                PhotoSize sizes_element;
                sizes_element = Tl.Parse <PhotoSize>(reader);
                this.sizes.Add(sizes_element);
            }
        }
        public override void Read(BinaryReader reader)
        {
            this.date = reader.ReadInt32();
            var expires = reader.ReadInt32();

            this.test_mode = reader.ReadUInt32() == 0x997275b5;
            this.this_dc   = reader.ReadInt32();
            reader.ReadInt32(); // vector code
            int dc_options_len = reader.ReadInt32();

            this.dc_options = new List <DcOption>(dc_options_len);
            for (int dc_options_index = 0; dc_options_index < dc_options_len; dc_options_index++)
            {
                DcOption dc_options_element;
                dc_options_element = Tl.Parse <DcOption>(reader);
                this.dc_options.Add(dc_options_element);
            }
            this.chat_size_max = reader.ReadInt32();
        }