Исправление не правильного кодирования сообщения

This commit is contained in:
2025-02-22 09:44:48 +03:00
parent c71585b100
commit 348947fb4c
3 changed files with 17 additions and 4 deletions
@@ -76,9 +76,20 @@ namespace mROA.Implementation.Frontend
var result = _executeModule.Execute(request, _contextRepository, _representationModule);
var resultType = result is FinalCommandExecution
? MessageType.FinishedCommandExecution
: MessageType.ExceptionCommandExecution;
var resultType = MessageType.Unknown;
switch (result)
{
case FinalCommandExecution:
resultType = MessageType.FinishedCommandExecution;
break;
case AsyncCommandExecution:
resultType = MessageType.AsyncCommandExecution;
break;
case ExceptionCommandExecution:
resultType = MessageType.ExceptionCommandExecution;
break;
}
_representationModule.PostCallMessage(request.Id, resultType, result, result.GetType());
}
+1 -1
View File
@@ -15,6 +15,6 @@ namespace mROA.Implementation
public enum MessageType
{
Unknown, FinishedCommandExecution, ExceptionCommandExecution, AsyncCancelCommandExecution, CallRequest, IdAssigning, CancelRequest
Unknown, FinishedCommandExecution, ExceptionCommandExecution, AsyncCommandExecution, CallRequest, IdAssigning, CancelRequest
}
}