mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-06 15:05:54 +00:00
Fixes
This commit is contained in:
parent
a14dfdc1fe
commit
2ffa954246
9 changed files with 225 additions and 37 deletions
|
|
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
|||
using TeleSharp.TL;
|
||||
namespace TeleSharp.TL.Auth
|
||||
{
|
||||
[TLObject(-2035355412)]
|
||||
[TLObject(-2035355412)]
|
||||
public class TLRequestSendCode : TLMethod
|
||||
{
|
||||
public override int Constructor
|
||||
|
|
@ -18,55 +18,55 @@ namespace TeleSharp.TL.Auth
|
|||
}
|
||||
}
|
||||
|
||||
public int flags { get; set; }
|
||||
public bool allow_flashcall { get; set; }
|
||||
public string phone_number { get; set; }
|
||||
public bool? current_number { get; set; }
|
||||
public int api_id { get; set; }
|
||||
public string api_hash { get; set; }
|
||||
public Auth.TLSentCode Response { get; set; }
|
||||
public int flags {get;set;}
|
||||
public bool allow_flashcall {get;set;}
|
||||
public string phone_number {get;set;}
|
||||
public bool? current_number {get;set;}
|
||||
public int api_id {get;set;}
|
||||
public string api_hash {get;set;}
|
||||
public Auth.TLSentCode Response{ get; set;}
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = allow_flashcall ? (flags | 1) : (flags & ~1);
|
||||
flags = current_number != null ? (flags | 1) : (flags & ~1);
|
||||
public void ComputeFlags()
|
||||
{
|
||||
flags = 0;
|
||||
flags = allow_flashcall ? (flags | 1) : (flags & ~1);
|
||||
flags = current_number != null ? (flags | 1) : (flags & ~1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
flags = br.ReadInt32();
|
||||
allow_flashcall = (flags & 1) != 0;
|
||||
phone_number = StringUtil.Deserialize(br);
|
||||
if ((flags & 1) != 0)
|
||||
current_number = BoolUtil.Deserialize(br);
|
||||
else
|
||||
current_number = null;
|
||||
allow_flashcall = (flags & 1) != 0;
|
||||
phone_number = StringUtil.Deserialize(br);
|
||||
if ((flags & 1) != 0)
|
||||
current_number = BoolUtil.Deserialize(br);
|
||||
else
|
||||
current_number = null;
|
||||
|
||||
api_id = br.ReadInt32();
|
||||
api_hash = StringUtil.Deserialize(br);
|
||||
api_id = br.ReadInt32();
|
||||
api_hash = StringUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
bw.Write(Constructor);
|
||||
ComputeFlags();
|
||||
bw.Write(flags);
|
||||
bw.Write(flags);
|
||||
|
||||
StringUtil.Serialize(phone_number, bw);
|
||||
if ((flags & 1) != 0)
|
||||
BoolUtil.Serialize(current_number.Value, bw);
|
||||
bw.Write(api_id);
|
||||
StringUtil.Serialize(api_hash, bw);
|
||||
StringUtil.Serialize(phone_number,bw);
|
||||
if ((flags & 1) != 0)
|
||||
BoolUtil.Serialize(current_number.Value,bw);
|
||||
bw.Write(api_id);
|
||||
StringUtil.Serialize(api_hash,bw);
|
||||
|
||||
}
|
||||
public override void deserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLSentCode)ObjectUtils.DeserializeObject(br);
|
||||
public override void deserializeResponse(BinaryReader br)
|
||||
{
|
||||
Response = (Auth.TLSentCode)ObjectUtils.DeserializeObject(br);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace TeleSharp.TL.Contacts
|
|||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
contacts = (TLVector<TLInputPhoneContact>)ObjectUtils.DeserializeVector<TLInputPhoneContact>(br);
|
||||
contacts = ObjectUtils.DeserializeVector<TLInputPhoneContact>(br);
|
||||
replace = BoolUtil.Deserialize(br);
|
||||
|
||||
}
|
||||
|
|
|
|||
13
TeleSharp.TL/TL/TLAbsBool.cs
Normal file
13
TeleSharp.TL/TL/TLAbsBool.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
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
|
||||
{
|
||||
public abstract class TLAbsBool : TLObject
|
||||
{
|
||||
}
|
||||
}
|
||||
39
TeleSharp.TL/TL/TLBoolFalse.cs
Normal file
39
TeleSharp.TL/TL/TLBoolFalse.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
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(-1132882121)]
|
||||
public class TLBoolFalse : TLAbsBool
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1132882121;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
39
TeleSharp.TL/TL/TLBoolTrue.cs
Normal file
39
TeleSharp.TL/TL/TLBoolTrue.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
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(-1720552011)]
|
||||
public class TLBoolTrue : TLAbsBool
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return -1720552011;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
39
TeleSharp.TL/TL/TLTrue.cs
Normal file
39
TeleSharp.TL/TL/TLTrue.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
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(1072550713)]
|
||||
public class TLTrue : TLObject
|
||||
{
|
||||
public override int Constructor
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1072550713;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void ComputeFlags()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void DeserializeBody(BinaryReader br)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
bw.Write(Constructor);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -53,7 +53,11 @@ namespace TeleSharp.TL
|
|||
|
||||
public override void SerializeBody(BinaryWriter bw)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
bw.Write(Constructor);
|
||||
foreach (var item in lists.Cast<TLObject>())
|
||||
{
|
||||
item.SerializeBody(bw);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -301,6 +301,7 @@
|
|||
<Compile Include="TL\Storage\TLFilePng.cs" />
|
||||
<Compile Include="TL\Storage\TLFileUnknown.cs" />
|
||||
<Compile Include="TL\Storage\TLFileWebp.cs" />
|
||||
<Compile Include="TL\TLAbsBool.cs" />
|
||||
<Compile Include="TL\TLAbsBotInlineMessage.cs" />
|
||||
<Compile Include="TL\TLAbsBotInlineResult.cs" />
|
||||
<Compile Include="TL\TLAbsChannelMessagesFilter.cs" />
|
||||
|
|
@ -370,6 +371,8 @@
|
|||
<Compile Include="TL\TLAbsWebPage.cs" />
|
||||
<Compile Include="TL\TLAccountDaysTTL.cs" />
|
||||
<Compile Include="TL\TLAuthorization.cs" />
|
||||
<Compile Include="TL\TLBoolFalse.cs" />
|
||||
<Compile Include="TL\TLBoolTrue.cs" />
|
||||
<Compile Include="TL\TLBotCommand.cs" />
|
||||
<Compile Include="TL\TLBotInfo.cs" />
|
||||
<Compile Include="TL\TLBotInlineMediaResult.cs" />
|
||||
|
|
@ -639,6 +642,7 @@
|
|||
<Compile Include="TL\TLTopPeerCategoryCorrespondents.cs" />
|
||||
<Compile Include="TL\TLTopPeerCategoryGroups.cs" />
|
||||
<Compile Include="TL\TLTopPeerCategoryPeers.cs" />
|
||||
<Compile Include="TL\TLTrue.cs" />
|
||||
<Compile Include="TL\TLUpdateBotCallbackQuery.cs" />
|
||||
<Compile Include="TL\TLUpdateBotInlineQuery.cs" />
|
||||
<Compile Include="TL\TLUpdateBotInlineSend.cs" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue