Exemplo n.º 1
0
 public override void DeserializeBody(BinaryReader br)
 {
     id = br.ReadInt64();
     access_hash = br.ReadInt64();
     date = br.ReadInt32();
     mime_type = StringUtil.Deserialize(br);
     size = br.ReadInt32();
     thumb = (TLAbsPhotoSize)ObjectUtils.DeserializeObject(br);
     dc_id = br.ReadInt32();
     attributes = (TLVector<TLAbsDocumentAttribute>)ObjectUtils.DeserializeVector<TLAbsDocumentAttribute>(br);
 }
 public override void deserializeBody(InputStream stream, TLContext context)
 {
     this.id         = StreamingUtils.readInt(stream);
     this.accessHash = StreamingUtils.readLong(stream);
     this.date       = StreamingUtils.readInt(stream);
     this.mimetype   = StreamingUtils.readTLString(stream);
     this.size       = StreamingUtils.readInt(stream);
     this.thumb      = StreamingUtils.readTLObject(stream, context);
     this.dcId       = StreamingUtils.readInt(stream);
     this.attributes = StreamingUtils.readTLVector(stream, context);
 }
Exemplo n.º 3
0
        private static TLAbsPhotoSize BestPhoto(IEnumerable <TLAbsPhotoSize> t6)
        {
            TLAbsPhotoSize r   = null;
            var            max = -1;

            foreach (var t7 in t6)
            {
                switch (t7)
                {
                case null:
                    continue;

                case TLPhotoSize t8 when t8.H <= max:
                    continue;

                case TLPhotoSize t8:
                    max = t8.H;
                    r   = t8;
                    break;
                }
            }

            return(r);
        }
 public virtual void setThumb(TLAbsPhotoSize thumb)
 {
     this.thumb = thumb;
 }