Added possibility to do ping request (SendPingAsync method)

This commit is contained in:
Eugene Timokhov 2016-11-07 02:40:19 +03:00
parent ca78532b34
commit 8b2f227142
5 changed files with 70 additions and 3 deletions

View file

@ -174,7 +174,7 @@ namespace TLSharp.Core
{
await _sender.Send(methodToExecute);
await _sender.Receive(methodToExecute);
var result = methodToExecute.GetType().GetProperty("Response").GetValue(methodToExecute);
return (T)result;
@ -292,6 +292,11 @@ namespace TLSharp.Core
return result;
}
public async Task SendPingAsync()
{
await _sender.SendPingAsync();
}
private void OnUserAuthenticated(TLUser TLUser)
{
_session.TLUser = TLUser;