решены баги и один шаг до обратного вызова

This commit is contained in:
2025-02-18 12:14:51 +03:00
parent 633e179131
commit 794c64aacb
9 changed files with 54 additions and 21 deletions
+6 -6
View File
@@ -20,13 +20,13 @@ public abstract class RemoteObjectBase
{
var request = new DefaultCallRequest
{ CommandId = methodId, ObjectId = _id, Parameter = parameter, ParameterType = parameter?.GetType() };
await _representationModule.PostCallMessage(request.CallRequestId, MessageType.CallRequest, request);
await _representationModule.PostCallMessageAsync(request.CallRequestId, MessageType.CallRequest, request);
var successResponse =
_representationModule.GetMessage<FinalCommandExecution<T>>(
_representationModule.GetMessageAsync<FinalCommandExecution<T>>(
messageType: MessageType.FinishedCommandExecution, requestId: request.CallRequestId);
var errorResponse =
_representationModule.GetMessage<ExceptionCommandExecution>(
_representationModule.GetMessageAsync<ExceptionCommandExecution>(
messageType: MessageType.ExceptionCommandExecution, requestId: request.CallRequestId);
Task.WaitAny(successResponse, errorResponse);
@@ -40,13 +40,13 @@ public abstract class RemoteObjectBase
{
var request = new DefaultCallRequest
{ CommandId = methodId, ObjectId = _id, Parameter = parameter, ParameterType = parameter?.GetType() };
await _representationModule.PostCallMessage(request.CallRequestId, MessageType.CallRequest, request);
await _representationModule.PostCallMessageAsync(request.CallRequestId, MessageType.CallRequest, request);
var successResponse =
_representationModule.GetMessage<FinalCommandExecution>(
_representationModule.GetMessageAsync<FinalCommandExecution>(
messageType: MessageType.FinishedCommandExecution, requestId: request.CallRequestId);
var errorResponse =
_representationModule.GetMessage<ExceptionCommandExecution>(
_representationModule.GetMessageAsync<ExceptionCommandExecution>(
messageType: MessageType.ExceptionCommandExecution, requestId: request.CallRequestId);
Task.WaitAny(successResponse, errorResponse);