UserFullConstructor : UserFull no accepts self id.

Added test method to GetUserFull
Added info to README.md
This commit is contained in:
Jesus 2016-05-18 12:55:22 +02:00
parent 2fff2d11c2
commit 6365297aaf
7 changed files with 98 additions and 3 deletions

View file

@ -0,0 +1,42 @@
using System;
using System.IO;
using TLSharp.Core.MTProto;
namespace TLSharp.Core.Requests
{
public class GetUserFullRequest : MTProtoRequest
{
private InputUser _inputUser;
public UserFull _userFull;
public GetUserFullRequest(int id)
{
_inputUser = new InputUserContactConstructor(id);
}
public override void OnSend(BinaryWriter writer)
{
writer.Write(0xca30a5b1);
_inputUser.Write(writer);
}
public override void OnResponse(BinaryReader reader)
{
_userFull = new UserFullConstructor();
var dataCode = reader.ReadUInt32();
_userFull.Read(reader);
}
public override void OnException(Exception exception)
{
throw new NotImplementedException();
}
public override bool Responded
{
get;
}
public override bool Confirmed => true;
}
}