TeleSharp.TL: fix build

Manual edits needed after code autogeneration.
This commit is contained in:
Andres G. Aragoneses 2020-04-16 16:30:58 +08:00
parent a3ebd07d82
commit 75fb3c1488
10 changed files with 44 additions and 63 deletions

View file

@ -24,7 +24,8 @@ namespace TeleSharp.TL.Auth
public string PhoneCodeHash { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public Auth.TLAbsAuthorization Response { get; set; }
// manual edit: TLAbsAuthorization->TLAuthorization
public Auth.TLAuthorization Response { get; set; }
public void ComputeFlags()
{
@ -50,7 +51,8 @@ namespace TeleSharp.TL.Auth
public override void DeserializeResponse(BinaryReader br)
{
Response = (Auth.TLAbsAuthorization)ObjectUtils.DeserializeObject(br);
// manual edit: TLAbsAuthorization->TLAuthorization
Response = (Auth.TLAuthorization)ObjectUtils.DeserializeObject(br);
}
}
}

View file

@ -20,7 +20,8 @@ namespace TeleSharp.TL.Contacts
}
}
public TLVector<SavedContact> Response { get; set; }
// manual edit: SavedContact -> TLSavedPhoneContact
public TLVector<TLSavedPhoneContact> Response { get; set; }
public void ComputeFlags()
{
@ -40,7 +41,8 @@ namespace TeleSharp.TL.Contacts
public override void DeserializeResponse(BinaryReader br)
{
Response = (TLVector<SavedContact>)ObjectUtils.DeserializeVector<SavedContact>(br);
// manual edit: SavedContact -> TLSavedPhoneContact
Response = (TLVector<TLSavedPhoneContact>)ObjectUtils.DeserializeVector<TLSavedPhoneContact> (br);
}
}
}

View file

@ -30,7 +30,8 @@ namespace TeleSharp.TL.Payments
public string NativeProvider { get; set; }
public TLDataJSON NativeParams { get; set; }
public TLPaymentRequestedInfo SavedInfo { get; set; }
public PaymentSavedCredentials SavedCredentials { get; set; }
// manual edit: PaymentSavedCredentials -> TLPaymentSavedCredentialsCard
public TLPaymentSavedCredentialsCard SavedCredentials { get; set; }
public TLVector<TLAbsUser> Users { get; set; }
public void ComputeFlags()
@ -63,7 +64,8 @@ namespace TeleSharp.TL.Payments
SavedInfo = null;
if ((Flags & 2) != 0)
SavedCredentials = (PaymentSavedCredentials)ObjectUtils.DeserializeObject(br);
// manual edit: PaymentSavedCredentials -> TLPaymentSavedCredentialsCard
SavedCredentials = (TLPaymentSavedCredentialsCard)ObjectUtils.DeserializeObject(br);
else
SavedCredentials = null;

View file

@ -20,8 +20,10 @@ namespace TeleSharp.TL
}
}
public FileLocation PhotoSmall { get; set; }
public FileLocation PhotoBig { get; set; }
// manual edit: FileLocation->TLFileLocationToBeDeprecated
public TLFileLocationToBeDeprecated PhotoSmall { get; set; }
// manual edit: FileLocation->TLFileLocationToBeDeprecated
public TLFileLocationToBeDeprecated PhotoBig { get; set; }
public int DcId { get; set; }
public void ComputeFlags()
@ -31,8 +33,10 @@ namespace TeleSharp.TL
public override void DeserializeBody(BinaryReader br)
{
PhotoSmall = (FileLocation)ObjectUtils.DeserializeObject(br);
PhotoBig = (FileLocation)ObjectUtils.DeserializeObject(br);
// manual edit: FileLocation->TLFileLocationToBeDeprecated
PhotoSmall = (TLFileLocationToBeDeprecated)ObjectUtils.DeserializeObject(br);
// manual edit: FileLocation->TLFileLocationToBeDeprecated
PhotoBig = (TLFileLocationToBeDeprecated)ObjectUtils.DeserializeObject(br);
DcId = br.ReadInt32();
}

View file

@ -20,7 +20,8 @@ namespace TeleSharp.TL
}
}
public TLVector<TLJSONObjectValue> Value { get; set; }
// manual edit: TLJSONObjectValue->TLJsonObjectValue
public TLVector<TLJsonObjectValue> Value { get; set; }
public void ComputeFlags()
{
@ -29,7 +30,8 @@ namespace TeleSharp.TL
public override void DeserializeBody(BinaryReader br)
{
Value = (TLVector<TLJSONObjectValue>)ObjectUtils.DeserializeVector<TLJSONObjectValue>(br);
// manual edit: TLJSONObjectValue->TLJsonObjectValue
Value = (TLVector<TLJsonObjectValue>)ObjectUtils.DeserializeVector<TLJsonObjectValue> (br);
}
public override void SerializeBody(BinaryWriter bw)

View file

@ -21,7 +21,8 @@ namespace TeleSharp.TL
}
public string Type { get; set; }
public FileLocation Location { get; set; }
// manual edit: FileLocation->TLFileLocationToBeDeprecated
public TLFileLocationToBeDeprecated Location { get; set; }
public int W { get; set; }
public int H { get; set; }
public byte[] Bytes { get; set; }
@ -34,7 +35,8 @@ namespace TeleSharp.TL
public override void DeserializeBody(BinaryReader br)
{
Type = StringUtil.Deserialize(br);
Location = (FileLocation)ObjectUtils.DeserializeObject(br);
// manual edit: FileLocation->TLFileLocationToBeDeprecated
Location = (TLFileLocationToBeDeprecated)ObjectUtils.DeserializeObject(br);
W = br.ReadInt32();
H = br.ReadInt32();
Bytes = BytesUtil.Deserialize(br);

View file

@ -21,7 +21,8 @@ namespace TeleSharp.TL
}
public string Type { get; set; }
public FileLocation Location { get; set; }
// manual edit: FileLocation->TLFileLocationToBeDeprecated
public TLFileLocationToBeDeprecated Location { get; set; }
public int W { get; set; }
public int H { get; set; }
public int Size { get; set; }
@ -34,7 +35,8 @@ namespace TeleSharp.TL
public override void DeserializeBody(BinaryReader br)
{
Type = StringUtil.Deserialize(br);
Location = (FileLocation)ObjectUtils.DeserializeObject(br);
// manual edit: FileLocation->TLFileLocationToBeDeprecated
Location = (TLFileLocationToBeDeprecated)ObjectUtils.DeserializeObject(br);
W = br.ReadInt32();
H = br.ReadInt32();
Size = br.ReadInt32();

View file

@ -21,8 +21,10 @@ namespace TeleSharp.TL
}
public long PhotoId { get; set; }
public FileLocation PhotoSmall { get; set; }
public FileLocation PhotoBig { get; set; }
// manual edit: FileLocation->TLFileLocationToBeDeprecated
public TLFileLocationToBeDeprecated PhotoSmall { get; set; }
// manual edit: FileLocation->TLFileLocationToBeDeprecated
public TLFileLocationToBeDeprecated PhotoBig { get; set; }
public int DcId { get; set; }
public void ComputeFlags()
@ -33,8 +35,10 @@ namespace TeleSharp.TL
public override void DeserializeBody(BinaryReader br)
{
PhotoId = br.ReadInt64();
PhotoSmall = (FileLocation)ObjectUtils.DeserializeObject(br);
PhotoBig = (FileLocation)ObjectUtils.DeserializeObject(br);
// manual edit: FileLocation->TLFileLocationToBeDeprecated
PhotoSmall = (TLFileLocationToBeDeprecated)ObjectUtils.DeserializeObject(br);
// manual edit: FileLocation->TLFileLocationToBeDeprecated
PhotoBig = (TLFileLocationToBeDeprecated)ObjectUtils.DeserializeObject(br);
DcId = br.ReadInt32();
}

View file

@ -1,41 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TeleSharp.TL;
namespace TeleSharp.TL
{
[TLObject(481674261)]
public class TLVector : TLObject
{
public override int Constructor
{
get
{
return 481674261;
}
}
// no fields
public void ComputeFlags()
{
// do nothing
}
public override void DeserializeBody(BinaryReader br)
{
// do nothing
}
public override void SerializeBody(BinaryWriter bw)
{
bw.Write(Constructor);
// do nothing
}
}
}

View file

@ -38,7 +38,8 @@ namespace TeleSharp.TL
public string Author { get; set; }
public TLAbsDocument Document { get; set; }
public TLPage CachedPage { get; set; }
public TLVector<WebPageAttribute> Attributes { get; set; }
// manual edit: WebPageAttribute->TLWebPageAttributeTheme
public TLVector<TLWebPageAttributeTheme> Attributes { get; set; }
public void ComputeFlags()
{
@ -118,7 +119,8 @@ namespace TeleSharp.TL
CachedPage = null;
if ((Flags & 4096) != 0)
Attributes = (TLVector<WebPageAttribute>)ObjectUtils.DeserializeVector<WebPageAttribute>(br);
// manual edit: WebPageAttribute->TLWebPageAttributeTheme
Attributes = (TLVector<TLWebPageAttributeTheme>)ObjectUtils.DeserializeVector<TLWebPageAttributeTheme> (br);
else
Attributes = null;