mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
Rename TeleSharp.TL->TgSharp.TL, fixing TgSharp.Core build (5/5)
This commit is contained in:
parent
350d28c7f8
commit
94edf1b3eb
|
|
@ -7,7 +7,8 @@ using System.Linq;
|
|||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using TeleSharp.TL;
|
||||
|
||||
using TgSharp.TL;
|
||||
using TgSharp.Core.Exceptions;
|
||||
using TgSharp.Core.MTProto;
|
||||
using TgSharp.Core.MTProto.Crypto;
|
||||
|
|
@ -37,7 +38,7 @@ namespace TgSharp.Core.Network
|
|||
return confirmed ? session.Sequence++ * 2 + 1 : session.Sequence * 2;
|
||||
}
|
||||
|
||||
public async Task Send(TeleSharp.TL.TLMethod request, CancellationToken token = default(CancellationToken))
|
||||
public async Task Send(TLMethod request, CancellationToken token = default(CancellationToken))
|
||||
{
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
|
|
@ -65,7 +66,7 @@ namespace TgSharp.Core.Network
|
|||
session.Save();
|
||||
}
|
||||
|
||||
public async Task Send(byte[] packet, TeleSharp.TL.TLMethod request, CancellationToken token = default(CancellationToken))
|
||||
public async Task Send(byte[] packet, TLMethod request, CancellationToken token = default(CancellationToken))
|
||||
{
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
|
|
@ -134,7 +135,7 @@ namespace TgSharp.Core.Network
|
|||
return new Tuple<byte[], ulong, int>(message, remoteMessageId, remoteSequence);
|
||||
}
|
||||
|
||||
public async Task<byte[]> Receive(TeleSharp.TL.TLMethod request, CancellationToken token = default(CancellationToken))
|
||||
public async Task<byte[]> Receive(TLMethod request, CancellationToken token = default(CancellationToken))
|
||||
{
|
||||
while (!request.ConfirmReceived)
|
||||
{
|
||||
|
|
@ -270,7 +271,7 @@ namespace TgSharp.Core.Network
|
|||
return true;
|
||||
}
|
||||
|
||||
private bool HandleRpcResult(ulong messageId, int sequence, BinaryReader messageReader, TeleSharp.TL.TLMethod request)
|
||||
private bool HandleRpcResult(ulong messageId, int sequence, BinaryReader messageReader, TLMethod request)
|
||||
{
|
||||
uint code = messageReader.ReadUInt32();
|
||||
ulong requestId = messageReader.ReadUInt64();
|
||||
|
|
@ -492,7 +493,7 @@ namespace TgSharp.Core.Network
|
|||
return true;
|
||||
}
|
||||
|
||||
private bool HandlePong(ulong messageId, int sequence, BinaryReader messageReader, TeleSharp.TL.TLMethod request)
|
||||
private bool HandlePong(ulong messageId, int sequence, BinaryReader messageReader, TLMethod request)
|
||||
{
|
||||
uint code = messageReader.ReadUInt32();
|
||||
ulong msgId = messageReader.ReadUInt64();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using TeleSharp.TL;
|
||||
|
||||
using TgSharp.TL;
|
||||
|
||||
namespace TgSharp.Core.Network.Requests
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using TeleSharp.TL;
|
||||
|
||||
using TgSharp.TL;
|
||||
using TgSharp.Core.Utils;
|
||||
|
||||
namespace TgSharp.Core.Network.Requests
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using TeleSharp.TL;
|
||||
|
||||
using TgSharp.TL;
|
||||
using TgSharp.Core.MTProto;
|
||||
using TgSharp.Core.MTProto.Crypto;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,20 +5,21 @@ using System.Security.Cryptography;
|
|||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using TeleSharp.TL;
|
||||
using TeleSharp.TL.Account;
|
||||
using TeleSharp.TL.Auth;
|
||||
using TeleSharp.TL.Contacts;
|
||||
using TeleSharp.TL.Help;
|
||||
using TeleSharp.TL.Messages;
|
||||
using TeleSharp.TL.Upload;
|
||||
|
||||
using TgSharp.TL;
|
||||
using TgSharp.TL.Account;
|
||||
using TgSharp.TL.Auth;
|
||||
using TgSharp.TL.Contacts;
|
||||
using TgSharp.TL.Help;
|
||||
using TgSharp.TL.Messages;
|
||||
using TgSharp.TL.Upload;
|
||||
using TgSharp.Core.Auth;
|
||||
using TgSharp.Core.Exceptions;
|
||||
using TgSharp.Core.MTProto.Crypto;
|
||||
using TgSharp.Core.Network;
|
||||
using TgSharp.Core.Network.Exceptions;
|
||||
using TgSharp.Core.Utils;
|
||||
using TLAuthorization = TeleSharp.TL.Auth.TLAuthorization;
|
||||
using TLAuthorization = TgSharp.TL.Auth.TLAuthorization;
|
||||
|
||||
namespace TgSharp.Core
|
||||
{
|
||||
|
|
@ -406,7 +407,7 @@ namespace TgSharp.Core
|
|||
/// <returns></returns>
|
||||
public async Task<TLFound> SearchUserAsync(string q, int limit = 10, CancellationToken token = default(CancellationToken))
|
||||
{
|
||||
var r = new TeleSharp.TL.Contacts.TLRequestSearch
|
||||
var r = new TL.Contacts.TLRequestSearch
|
||||
{
|
||||
Q = q,
|
||||
Limit = limit
|
||||
|
|
|
|||
|
|
@ -6,8 +6,9 @@ using System.Security.Cryptography;
|
|||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using TeleSharp.TL;
|
||||
using TeleSharp.TL.Upload;
|
||||
|
||||
using TgSharp.TL;
|
||||
using TgSharp.TL.Upload;
|
||||
|
||||
namespace TgSharp.Core.Utils
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue