mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-09 08:25:13 +00:00
UserFullConstructor : UserFull no accepts self id.
Added test method to GetUserFull Added info to README.md
This commit is contained in:
parent
2fff2d11c2
commit
6365297aaf
7 changed files with 98 additions and 3 deletions
42
TLSharp.Core/Requests/GetUserFullRequest.cs
Normal file
42
TLSharp.Core/Requests/GetUserFullRequest.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue