public override void Update(TLPhotoBase photo) { var p = photo as TLPhoto; if (p != null) { base.Update(p); AccessHash = p.AccessHash; UserId = p.UserId; Date = p.Date; Caption = p.Caption; Geo = p.Geo; if (AccessHash.Value != p.AccessHash.Value) { Sizes = p.Sizes; } else { for (var i = 0; i < Sizes.Count; i++) { Sizes[i].Update(p.Sizes[i]); } } } }
public override TLObject FromStream(Stream input) { PrevPhoto = GetObject <TLPhotoBase>(input); NewPhoto = GetObject <TLPhotoBase>(input); return(this); }
public override TLObject FromBytes(byte[] bytes, ref int position) { bytes.ThrowExceptionIfIncorrect(ref position, Signature); Photo = GetObject <TLPhotoBase>(bytes, ref position); return(this); }
public override TLObject FromStream(Stream input) { Id = GetObject <TLString>(input); Type = GetObject <TLString>(input); Photo = GetObject <TLPhotoBase>(input); SendMessage = GetObject <TLBotInlineMessageBase>(input); return(this); }
public override void Update(TLPhotoBase photo) { var mediaPhoto = photo as TLMediaPhotoBase; if (mediaPhoto != null) { Id = mediaPhoto.Id; } }
public override TLObject FromStream(Stream input) { Photo = GetObject <TLPhotoBase>(input); var isoFileName = GetObject <TLString>(input); IsoFileName = isoFileName.ToString(); return(this); }
public override TLObject FromBytes(byte[] bytes, ref int position) { bytes.ThrowExceptionIfIncorrect(ref position, Signature); Id = GetObject <TLString>(bytes, ref position); Type = GetObject <TLString>(bytes, ref position); Photo = GetObject <TLPhotoBase>(bytes, ref position); SendMessage = GetObject <TLBotInlineMessageBase>(bytes, ref position); return(this); }
public override TLObject FromStream(Stream input) { Id = GetObject <TLInt>(input); _title = GetObject <TLString>(input); _photo = GetObject <TLPhotoBase>(input); ParticipantIds = GetObject <TLVector <TLInt> >(input); Participants = GetObject <TLObject>(input) as TLChatParticipantsBase; NotifySettings = GetObject <TLObject>(input) as TLPeerNotifySettingsBase; return(this); }
public override TLObject FromBytes(byte[] bytes, ref int position) { bytes.ThrowExceptionIfIncorrect(ref position, Signature); Id = GetObject <TLInt>(bytes, ref position); _title = GetObject <TLString>(bytes, ref position); _photo = GetObject <TLPhotoBase>(bytes, ref position); ParticipantsCount = GetObject <TLInt>(bytes, ref position); Date = GetObject <TLInt>(bytes, ref position); Left = GetObject <TLBool>(bytes, ref position); Version = GetObject <TLInt>(bytes, ref position); return(this); }
public override TLObject FromStream(Stream input) { Id = GetObject <TLInt>(input); _title = GetObject <TLString>(input); _photo = GetObject <TLPhotoBase>(input); ParticipantsCount = GetObject <TLInt>(input); Date = GetObject <TLInt>(input); Left = GetObject <TLBool>(input); Version = GetObject <TLInt>(input); Participants = GetObject <TLObject>(input) as TLChatParticipantsBase; NotifySettings = GetObject <TLObject>(input) as TLPeerNotifySettingsBase; return(this); }
public override void Update(TLChatBase chat) { base.Update(chat); var c = chat as TLBroadcastChat; if (c != null) { _title = c.Title; if (Photo.GetType() != c.Photo.GetType()) { _photo = c.Photo; } else { Photo.Update(c.Photo); } ParticipantIds = c.ParticipantIds; } }
public override void Update(TLChatBase chat) { base.Update(chat); var c = chat as TLChat; if (c != null) { _title = c.Title; if (Photo.GetType() != c.Photo.GetType()) { _photo = c.Photo; // при удалении фото чата не обновляется UI при _photo = c.Photo } else { Photo.Update(c.Photo); } ParticipantsCount = c.ParticipantsCount; Date = c.Date; Left = c.Left; Version = c.Version; } }
public override void Update(TLPhotoBase photo) { var photoCommon = photo as TLPhotoCommon; if (photoCommon != null) { if (PhotoSmall != null) { PhotoSmall.Update(photoCommon.PhotoSmall); } else { PhotoSmall = photoCommon.PhotoSmall; } if (PhotoBig != null) { PhotoBig.Update(photoCommon.PhotoBig); } else { PhotoBig = photoCommon.PhotoBig; } } }
public abstract void Update(TLPhotoBase photo);
public override void Update(TLPhotoBase photo) { }