public override TLObject FromStream(Stream input) { Flags = GetObject <TLInt>(input); Type = GetObject <TLSecureValueTypeBase>(input); _data = GetObject <TLSecureData>(Flags, (int)SecureValueFlags.Data, null, input); _frontSide = GetObject <TLSecureFileBase>(Flags, (int)SecureValueFlags.FrontSide, null, input); _reverseSide = GetObject <TLSecureFileBase>(Flags, (int)SecureValueFlags.ReverseSide, null, input); _selfie = GetObject <TLSecureFileBase>(Flags, (int)SecureValueFlags.Selfie, null, input); _files = GetObject <TLVector <TLSecureFileBase> >(Flags, (int)SecureValueFlags.Files, null, input); _plainData = GetObject <TLSecurePlainDataBase>(Flags, (int)SecureValueFlags.PlainData, null, input); Hash = GetObject <TLString>(input); return(this); }
public override TLObject FromBytes(byte[] bytes, ref int position) { bytes.ThrowExceptionIfIncorrect(ref position, Signature); Flags = GetObject <TLInt>(bytes, ref position); Type = GetObject <TLSecureValueTypeBase>(bytes, ref position); _data = GetObject <TLSecureData>(Flags, (int)SecureValueFlags.Data, null, bytes, ref position); _frontSide = GetObject <TLSecureFileBase>(Flags, (int)SecureValueFlags.FrontSide, null, bytes, ref position); _reverseSide = GetObject <TLSecureFileBase>(Flags, (int)SecureValueFlags.ReverseSide, null, bytes, ref position); _selfie = GetObject <TLSecureFileBase>(Flags, (int)SecureValueFlags.Selfie, null, bytes, ref position); _files = GetObject <TLVector <TLSecureFileBase> >(Flags, (int)SecureValueFlags.Files, null, bytes, ref position); _plainData = GetObject <TLSecurePlainDataBase>(Flags, (int)SecureValueFlags.PlainData, null, bytes, ref position); Hash = GetObject <TLString>(bytes, ref position); return(this); }