mirror of
https://github.com/sochix/TLSharp.git
synced 2025-12-06 08:02:00 +01:00
Fix dc loop #719
This commit is contained in:
parent
f2a394ea15
commit
558d58a950
|
|
@ -66,7 +66,7 @@ namespace TLSharp.Core.Network
|
||||||
|
|
||||||
byte[] msgKey;
|
byte[] msgKey;
|
||||||
byte[] ciphertext;
|
byte[] ciphertext;
|
||||||
using (MemoryStream plaintextPacket = makeMemory(8 + 8 + 8 + 4 + 4 + packet.Length))
|
using (MemoryStream plaintextPacket = MakeMemory(8 + 8 + 8 + 4 + 4 + packet.Length))
|
||||||
{
|
{
|
||||||
using (BinaryWriter plaintextWriter = new BinaryWriter(plaintextPacket))
|
using (BinaryWriter plaintextWriter = new BinaryWriter(plaintextPacket))
|
||||||
{
|
{
|
||||||
|
|
@ -82,7 +82,7 @@ namespace TLSharp.Core.Network
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
using (MemoryStream ciphertextPacket = makeMemory(8 + 16 + ciphertext.Length))
|
using (MemoryStream ciphertextPacket = MakeMemory(8 + 16 + ciphertext.Length))
|
||||||
{
|
{
|
||||||
using (BinaryWriter writer = new BinaryWriter(ciphertextPacket))
|
using (BinaryWriter writer = new BinaryWriter(ciphertextPacket))
|
||||||
{
|
{
|
||||||
|
|
@ -136,7 +136,7 @@ namespace TLSharp.Core.Network
|
||||||
using (var messageStream = new MemoryStream(result.Item1, false))
|
using (var messageStream = new MemoryStream(result.Item1, false))
|
||||||
using (var messageReader = new BinaryReader(messageStream))
|
using (var messageReader = new BinaryReader(messageStream))
|
||||||
{
|
{
|
||||||
processMessage(result.Item2, result.Item3, messageReader, request);
|
ProcessMessage(result.Item2, result.Item3, messageReader, request);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -156,7 +156,7 @@ namespace TLSharp.Core.Network
|
||||||
await Receive(pingRequest);
|
await Receive(pingRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool processMessage(ulong messageId, int sequence, BinaryReader messageReader, TeleSharp.TL.TLMethod request)
|
private bool ProcessMessage(ulong messageId, int sequence, BinaryReader messageReader, TeleSharp.TL.TLMethod request)
|
||||||
{
|
{
|
||||||
// TODO: check salt
|
// TODO: check salt
|
||||||
// TODO: check sessionid
|
// TODO: check sessionid
|
||||||
|
|
@ -240,7 +240,7 @@ namespace TLSharp.Core.Network
|
||||||
using (MemoryStream packedStream = new MemoryStream(packedData, false))
|
using (MemoryStream packedStream = new MemoryStream(packedData, false))
|
||||||
using (BinaryReader compressedReader = new BinaryReader(packedStream))
|
using (BinaryReader compressedReader = new BinaryReader(packedStream))
|
||||||
{
|
{
|
||||||
processMessage(messageId, sequence, compressedReader, request);
|
ProcessMessage(messageId, sequence, compressedReader, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -503,7 +503,7 @@ namespace TLSharp.Core.Network
|
||||||
long beginPosition = messageReader.BaseStream.Position;
|
long beginPosition = messageReader.BaseStream.Position;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!processMessage(innerMessageId, sequence, messageReader, request))
|
if (!ProcessMessage(innerMessageId, sequence, messageReader, request))
|
||||||
{
|
{
|
||||||
messageReader.BaseStream.Position = beginPosition + innerLength;
|
messageReader.BaseStream.Position = beginPosition + innerLength;
|
||||||
}
|
}
|
||||||
|
|
@ -518,7 +518,7 @@ namespace TLSharp.Core.Network
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private MemoryStream makeMemory(int len)
|
private MemoryStream MakeMemory(int len)
|
||||||
{
|
{
|
||||||
return new MemoryStream(new byte[len], 0, len, true, true);
|
return new MemoryStream(new byte[len], 0, len, true, true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,9 @@
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>TLSharp.Core</RootNamespace>
|
<RootNamespace>TLSharp.Core</RootNamespace>
|
||||||
<AssemblyName>TLSharp.Core</AssemblyName>
|
<AssemblyName>TLSharp.Core</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,13 @@ namespace TLSharp.Core
|
||||||
public class TelegramClient : IDisposable
|
public class TelegramClient : IDisposable
|
||||||
{
|
{
|
||||||
private MtProtoSender _sender;
|
private MtProtoSender _sender;
|
||||||
private AuthKey _key;
|
private readonly AuthKey _key;
|
||||||
private TcpTransport _transport;
|
private TcpTransport _transport;
|
||||||
private string _apiHash = "";
|
private string _apiHash = "";
|
||||||
private int _apiId = 0;
|
private int _apiId = 0;
|
||||||
private Session _session;
|
private Session _session;
|
||||||
private List<TLDcOption> dcOptions;
|
private List<TLDcOption> dcOptions;
|
||||||
private TcpClientConnectionHandler _handler;
|
private readonly TcpClientConnectionHandler _handler;
|
||||||
|
|
||||||
public TelegramClient(int apiId, string apiHash,
|
public TelegramClient(int apiId, string apiHash,
|
||||||
ISessionStore store = null, string sessionUserId = "session", TcpClientConnectionHandler handler = null)
|
ISessionStore store = null, string sessionUserId = "session", TcpClientConnectionHandler handler = null)
|
||||||
|
|
@ -78,7 +78,7 @@ namespace TLSharp.Core
|
||||||
dcOptions = ((TLConfig)invokewithLayer.Response).DcOptions.ToList();
|
dcOptions = ((TLConfig)invokewithLayer.Response).DcOptions.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task ReconnectToDcAsync(int dcId)
|
private async Task ReconnectToDcAsync(int dcId, int times)
|
||||||
{
|
{
|
||||||
if (dcOptions == null || !dcOptions.Any())
|
if (dcOptions == null || !dcOptions.Any())
|
||||||
throw new InvalidOperationException($"Can't reconnect. Establish initial connection first.");
|
throw new InvalidOperationException($"Can't reconnect. Establish initial connection first.");
|
||||||
|
|
@ -87,7 +87,7 @@ namespace TLSharp.Core
|
||||||
if (_session.TLUser != null)
|
if (_session.TLUser != null)
|
||||||
{
|
{
|
||||||
TLRequestExportAuthorization exportAuthorization = new TLRequestExportAuthorization() { DcId = dcId };
|
TLRequestExportAuthorization exportAuthorization = new TLRequestExportAuthorization() { DcId = dcId };
|
||||||
exported = await SendRequestAsync<TLExportedAuthorization>(exportAuthorization);
|
exported = await SendRequestAsync<TLExportedAuthorization>(exportAuthorization,times);
|
||||||
}
|
}
|
||||||
|
|
||||||
var dc = dcOptions.First(d => d.Id == dcId);
|
var dc = dcOptions.First(d => d.Id == dcId);
|
||||||
|
|
@ -101,12 +101,14 @@ namespace TLSharp.Core
|
||||||
if (_session.TLUser != null)
|
if (_session.TLUser != null)
|
||||||
{
|
{
|
||||||
TLRequestImportAuthorization importAuthorization = new TLRequestImportAuthorization() { Id = exported.Id, Bytes = exported.Bytes };
|
TLRequestImportAuthorization importAuthorization = new TLRequestImportAuthorization() { Id = exported.Id, Bytes = exported.Bytes };
|
||||||
var imported = await SendRequestAsync<TLAuthorization>(importAuthorization);
|
var imported = await SendRequestAsync<TLAuthorization>(importAuthorization,times);
|
||||||
OnUserAuthenticated(((TLUser)imported.User));
|
OnUserAuthenticated(((TLUser)imported.User));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task RequestWithDcMigration(TLMethod request)
|
private async Task RequestWithDcMigration(TLMethod request, int times)
|
||||||
{
|
{
|
||||||
if (_sender == null)
|
if (_sender == null)
|
||||||
throw new InvalidOperationException("Not connected!");
|
throw new InvalidOperationException("Not connected!");
|
||||||
|
|
@ -122,10 +124,21 @@ namespace TLSharp.Core
|
||||||
}
|
}
|
||||||
catch(DataCenterMigrationException e)
|
catch(DataCenterMigrationException e)
|
||||||
{
|
{
|
||||||
await ReconnectToDcAsync(e.DC);
|
if (times <= 1)
|
||||||
|
{
|
||||||
|
await ReconnectToDcAsync(e.DC, times + 1);
|
||||||
// prepare the request for another try
|
// prepare the request for another try
|
||||||
request.ConfirmReceived = false;
|
request.ConfirmReceived = false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (TLSharp.Core.Network.FloodException e)
|
||||||
|
{
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -141,7 +154,7 @@ namespace TLSharp.Core
|
||||||
|
|
||||||
var authCheckPhoneRequest = new TLRequestCheckPhone() { PhoneNumber = phoneNumber };
|
var authCheckPhoneRequest = new TLRequestCheckPhone() { PhoneNumber = phoneNumber };
|
||||||
|
|
||||||
await RequestWithDcMigration(authCheckPhoneRequest);
|
await RequestWithDcMigration(authCheckPhoneRequest,0);
|
||||||
|
|
||||||
return authCheckPhoneRequest.Response.PhoneRegistered;
|
return authCheckPhoneRequest.Response.PhoneRegistered;
|
||||||
}
|
}
|
||||||
|
|
@ -153,7 +166,7 @@ namespace TLSharp.Core
|
||||||
|
|
||||||
var request = new TLRequestSendCode() { PhoneNumber = phoneNumber, ApiId = _apiId, ApiHash = _apiHash };
|
var request = new TLRequestSendCode() { PhoneNumber = phoneNumber, ApiId = _apiId, ApiHash = _apiHash };
|
||||||
|
|
||||||
await RequestWithDcMigration(request);
|
await RequestWithDcMigration(request,0);
|
||||||
|
|
||||||
return request.Response.PhoneCodeHash;
|
return request.Response.PhoneCodeHash;
|
||||||
}
|
}
|
||||||
|
|
@ -171,7 +184,7 @@ namespace TLSharp.Core
|
||||||
|
|
||||||
var request = new TLRequestSignIn() { PhoneNumber = phoneNumber, PhoneCodeHash = phoneCodeHash, PhoneCode = code };
|
var request = new TLRequestSignIn() { PhoneNumber = phoneNumber, PhoneCodeHash = phoneCodeHash, PhoneCode = code };
|
||||||
|
|
||||||
await RequestWithDcMigration(request);
|
await RequestWithDcMigration(request,0);
|
||||||
|
|
||||||
OnUserAuthenticated(((TLUser)request.Response.User));
|
OnUserAuthenticated(((TLUser)request.Response.User));
|
||||||
|
|
||||||
|
|
@ -182,7 +195,7 @@ namespace TLSharp.Core
|
||||||
{
|
{
|
||||||
var request = new TLRequestGetPassword();
|
var request = new TLRequestGetPassword();
|
||||||
|
|
||||||
await RequestWithDcMigration(request);
|
await RequestWithDcMigration(request,0);
|
||||||
|
|
||||||
return ((TLPassword)request.Response);
|
return ((TLPassword)request.Response);
|
||||||
}
|
}
|
||||||
|
|
@ -198,7 +211,7 @@ namespace TLSharp.Core
|
||||||
|
|
||||||
var request = new TLRequestCheckPassword() { PasswordHash = password_hash };
|
var request = new TLRequestCheckPassword() { PasswordHash = password_hash };
|
||||||
|
|
||||||
await RequestWithDcMigration(request);
|
await RequestWithDcMigration(request,0);
|
||||||
|
|
||||||
OnUserAuthenticated(((TLUser)request.Response.User));
|
OnUserAuthenticated(((TLUser)request.Response.User));
|
||||||
|
|
||||||
|
|
@ -209,15 +222,15 @@ namespace TLSharp.Core
|
||||||
{
|
{
|
||||||
var request = new TLRequestSignUp() { PhoneNumber = phoneNumber, PhoneCode = code, PhoneCodeHash = phoneCodeHash, FirstName = firstName, LastName = lastName };
|
var request = new TLRequestSignUp() { PhoneNumber = phoneNumber, PhoneCode = code, PhoneCodeHash = phoneCodeHash, FirstName = firstName, LastName = lastName };
|
||||||
|
|
||||||
await RequestWithDcMigration(request);
|
await RequestWithDcMigration(request,0);
|
||||||
|
|
||||||
OnUserAuthenticated(((TLUser)request.Response.User));
|
OnUserAuthenticated(((TLUser)request.Response.User));
|
||||||
|
|
||||||
return ((TLUser)request.Response.User);
|
return ((TLUser)request.Response.User);
|
||||||
}
|
}
|
||||||
public async Task<T> SendRequestAsync<T>(TLMethod methodToExecute)
|
public async Task<T> SendRequestAsync<T>(TLMethod methodToExecute, int times)
|
||||||
{
|
{
|
||||||
await RequestWithDcMigration(methodToExecute);
|
await RequestWithDcMigration(methodToExecute, times);
|
||||||
|
|
||||||
var result = methodToExecute.GetType().GetProperty("Response").GetValue(methodToExecute);
|
var result = methodToExecute.GetType().GetProperty("Response").GetValue(methodToExecute);
|
||||||
|
|
||||||
|
|
@ -231,7 +244,7 @@ namespace TLSharp.Core
|
||||||
|
|
||||||
var req = new TLRequestGetContacts() { Hash = "" };
|
var req = new TLRequestGetContacts() { Hash = "" };
|
||||||
|
|
||||||
return await SendRequestAsync<TLContacts>(req);
|
return await SendRequestAsync<TLContacts>(req,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<TLAbsUpdates> SendMessageAsync(TLAbsInputPeer peer, string message)
|
public async Task<TLAbsUpdates> SendMessageAsync(TLAbsInputPeer peer, string message)
|
||||||
|
|
@ -239,13 +252,13 @@ namespace TLSharp.Core
|
||||||
if (!IsUserAuthorized())
|
if (!IsUserAuthorized())
|
||||||
throw new InvalidOperationException("Authorize user first!");
|
throw new InvalidOperationException("Authorize user first!");
|
||||||
|
|
||||||
return await SendRequestAsync<TLAbsUpdates>(
|
var x = new TLRequestSendMessage()
|
||||||
new TLRequestSendMessage()
|
|
||||||
{
|
{
|
||||||
Peer = peer,
|
Peer = peer,
|
||||||
Message = message,
|
Message = message,
|
||||||
RandomId = Helpers.GenerateRandomLong()
|
RandomId = Helpers.GenerateRandomLong()
|
||||||
});
|
};
|
||||||
|
return await SendRequestAsync<TLAbsUpdates>(x, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Boolean> SendTypingAsync(TLAbsInputPeer peer)
|
public async Task<Boolean> SendTypingAsync(TLAbsInputPeer peer)
|
||||||
|
|
@ -255,7 +268,7 @@ namespace TLSharp.Core
|
||||||
Action = new TLSendMessageTypingAction(),
|
Action = new TLSendMessageTypingAction(),
|
||||||
Peer = peer
|
Peer = peer
|
||||||
};
|
};
|
||||||
return await SendRequestAsync<Boolean>(req);
|
return await SendRequestAsync<Boolean>(req,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<TLAbsDialogs> GetUserDialogsAsync(int offsetDate = 0, int offsetId = 0, TLAbsInputPeer offsetPeer = null, int limit = 100)
|
public async Task<TLAbsDialogs> GetUserDialogsAsync(int offsetDate = 0, int offsetId = 0, TLAbsInputPeer offsetPeer = null, int limit = 100)
|
||||||
|
|
@ -273,7 +286,7 @@ namespace TLSharp.Core
|
||||||
OffsetPeer = offsetPeer,
|
OffsetPeer = offsetPeer,
|
||||||
Limit = limit
|
Limit = limit
|
||||||
};
|
};
|
||||||
return await SendRequestAsync<TLAbsDialogs>(req);
|
return await SendRequestAsync<TLAbsDialogs>(req,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<TLAbsUpdates> SendUploadedPhoto(TLAbsInputPeer peer, TLAbsInputFile file, string caption)
|
public async Task<TLAbsUpdates> SendUploadedPhoto(TLAbsInputPeer peer, TLAbsInputFile file, string caption)
|
||||||
|
|
@ -285,7 +298,7 @@ namespace TLSharp.Core
|
||||||
ClearDraft = false,
|
ClearDraft = false,
|
||||||
Media = new TLInputMediaUploadedPhoto() { File = file, Caption = caption },
|
Media = new TLInputMediaUploadedPhoto() { File = file, Caption = caption },
|
||||||
Peer = peer
|
Peer = peer
|
||||||
});
|
},0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<TLAbsUpdates> SendUploadedDocument(
|
public async Task<TLAbsUpdates> SendUploadedDocument(
|
||||||
|
|
@ -304,7 +317,7 @@ namespace TLSharp.Core
|
||||||
Attributes = attributes
|
Attributes = attributes
|
||||||
},
|
},
|
||||||
Peer = peer
|
Peer = peer
|
||||||
});
|
},0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<TLFile> GetFile(TLAbsInputFileLocation location, int filePartSize, int offset = 0)
|
public async Task<TLFile> GetFile(TLAbsInputFileLocation location, int filePartSize, int offset = 0)
|
||||||
|
|
@ -315,7 +328,7 @@ namespace TLSharp.Core
|
||||||
Location = location,
|
Location = location,
|
||||||
Limit = filePartSize,
|
Limit = filePartSize,
|
||||||
Offset = offset
|
Offset = offset
|
||||||
});
|
},0);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -339,7 +352,7 @@ namespace TLSharp.Core
|
||||||
MaxId = maxId,
|
MaxId = maxId,
|
||||||
MinId = minId
|
MinId = minId
|
||||||
};
|
};
|
||||||
return await SendRequestAsync<TLAbsMessages>(req);
|
return await SendRequestAsync<TLAbsMessages>(req,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -356,7 +369,7 @@ namespace TLSharp.Core
|
||||||
Limit = limit
|
Limit = limit
|
||||||
};
|
};
|
||||||
|
|
||||||
return await SendRequestAsync<TLFound>(r);
|
return await SendRequestAsync<TLFound>(r,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnUserAuthenticated(TLUser TLUser)
|
private void OnUserAuthenticated(TLUser TLUser)
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ namespace TLSharp.Core.Utils
|
||||||
FilePart = partNumber,
|
FilePart = partNumber,
|
||||||
Bytes = part,
|
Bytes = part,
|
||||||
FileTotalParts = partsCount
|
FileTotalParts = partsCount
|
||||||
});
|
},0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -106,7 +106,7 @@ namespace TLSharp.Core.Utils
|
||||||
FileId = file_id,
|
FileId = file_id,
|
||||||
FilePart = partNumber,
|
FilePart = partNumber,
|
||||||
Bytes = part
|
Bytes = part
|
||||||
});
|
},0);
|
||||||
}
|
}
|
||||||
partNumber++;
|
partNumber++;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="DotNetZip" version="1.9.3" targetFramework="net451" />
|
<package id="DotNetZip" version="1.11.0" targetFramework="net451" />
|
||||||
<package id="MarkerMetro.Unity.Ionic.Zlib" version="2.0.0.14" targetFramework="net452" />
|
<package id="MarkerMetro.Unity.Ionic.Zlib" version="2.0.0.14" targetFramework="net452" />
|
||||||
</packages>
|
</packages>
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
|
@ -7,7 +7,8 @@
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<RootNamespace>TLSharp.Tests.NUnit</RootNamespace>
|
<RootNamespace>TLSharp.Tests.NUnit</RootNamespace>
|
||||||
<AssemblyName>TLSharp.Tests.NUnit</AssemblyName>
|
<AssemblyName>TLSharp.Tests.NUnit</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>TLSharp.Tests.VS</RootNamespace>
|
<RootNamespace>TLSharp.Tests.VS</RootNamespace>
|
||||||
<AssemblyName>TLSharp.Tests.VS</AssemblyName>
|
<AssemblyName>TLSharp.Tests.VS</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
|
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
|
||||||
<IsCodedUITest>False</IsCodedUITest>
|
<IsCodedUITest>False</IsCodedUITest>
|
||||||
<TestProjectType>UnitTest</TestProjectType>
|
<TestProjectType>UnitTest</TestProjectType>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,9 @@
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>TLSharp.Tests</RootNamespace>
|
<RootNamespace>TLSharp.Tests</RootNamespace>
|
||||||
<AssemblyName>TLSharp.Tests</AssemblyName>
|
<AssemblyName>TLSharp.Tests</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="ApiHash" value="" />
|
<add key="ApiHash" value=""/>
|
||||||
<add key="ApiId" value="" />
|
<add key="ApiId" value=""/>
|
||||||
<add key="NumberToAuthenticate" value="" />
|
<add key="NumberToAuthenticate" value=""/>
|
||||||
<add key="CodeToAuthenticate" value="" />
|
<add key="CodeToAuthenticate" value=""/>
|
||||||
<add key="PasswordToAuthenticate" value=""/>
|
<add key="PasswordToAuthenticate" value=""/>
|
||||||
<add key="NotRegisteredNumberToSignUp" value=""/>
|
<add key="NotRegisteredNumberToSignUp" value=""/>
|
||||||
<add key="NumberToSendMessage" value=""/>
|
<add key="NumberToSendMessage" value=""/>
|
||||||
|
|
@ -12,4 +12,4 @@
|
||||||
<add key="NumberToGetUserFull" value=""/>
|
<add key="NumberToGetUserFull" value=""/>
|
||||||
<add key="NumberToAddToChat" value=""/>
|
<add key="NumberToAddToChat" value=""/>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
</configuration>
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<configuration>
|
<configuration>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
||||||
</startup>
|
</startup>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|
@ -9,9 +9,10 @@
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>TeleSharp.Generator</RootNamespace>
|
<RootNamespace>TeleSharp.Generator</RootNamespace>
|
||||||
<AssemblyName>TeleSharp.Generator</AssemblyName>
|
<AssemblyName>TeleSharp.Generator</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,9 @@
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>TeleSharp.TL</RootNamespace>
|
<RootNamespace>TeleSharp.TL</RootNamespace>
|
||||||
<AssemblyName>TeleSharp.TL</AssemblyName>
|
<AssemblyName>TeleSharp.TL</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||||
<FileAlignment>512</FileAlignment>
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue