Merge pull request #2 from chusothe41/master

UserFullConstructor : UserFull no accepts self id.
This commit is contained in:
eaba 2016-05-23 15:07:44 +01:00
commit ac05172359
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;
}
}