Make Client.Execute static in C# binding.
GitOrigin-RevId: d31bf0d0e6fcf2a762d209f6d62127bd6eaa09e7
This commit is contained in:
parent
44d21ecc4a
commit
fccd0c39eb
@ -216,7 +216,7 @@ namespace TdExample
|
||||
_client = CreateTdClient();
|
||||
|
||||
// test Client.Execute
|
||||
_defaultHandler.OnResult(_client.Execute(new TdApi.GetTextEntities("@telegram /test_command https://telegram.org telegram.me @gif @test")));
|
||||
_defaultHandler.OnResult(Td.Client.Execute(new TdApi.GetTextEntities("@telegram /test_command https://telegram.org telegram.me @gif @test")));
|
||||
|
||||
// main loop
|
||||
while (!_quiting)
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
/// <param name="function">Object representing a query to the TDLib.</param>
|
||||
/// <returns>Returns request result.</returns>
|
||||
/// <exception cref="NullReferenceException">Thrown when query is null.</exception>
|
||||
Api::BaseObject^ Execute(Api::Function^ function) {
|
||||
static Api::BaseObject^ Execute(Api::Function^ function) {
|
||||
if (function == nullptr) {
|
||||
throw REF_NEW NullReferenceException("Function can't be null");
|
||||
}
|
||||
@ -69,7 +69,7 @@ public:
|
||||
td::Client::Request request;
|
||||
request.id = 0;
|
||||
request.function = td::td_api::move_object_as<td::td_api::Function>(ToUnmanaged(function)->get_object_ptr());
|
||||
return Api::FromUnmanaged(*client->execute(std::move(request)).object);
|
||||
return Api::FromUnmanaged(*td::Client::execute(std::move(request)).object);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user