чистка после решения бага

This commit is contained in:
2025-02-15 09:07:59 +03:00
parent 4f0304cb43
commit 5489a0f85c
3 changed files with 0 additions and 7 deletions
@@ -14,9 +14,6 @@ public class BasicExecutionModule : IExecuteModule
public ICommandExecution Execute(ICallRequest command, IContextRepository _contextRepo) public ICommandExecution Execute(ICallRequest command, IContextRepository _contextRepo)
{ {
Console.WriteLine($"Executing command: {command.CommandId}");
Thread.Sleep(100);
if (_methodRepo is null) if (_methodRepo is null)
throw new NullReferenceException("Method repository was not defined"); throw new NullReferenceException("Method repository was not defined");
@@ -27,7 +27,6 @@ public class JsonSerialisationModule : ISerialisationModule
command.Parameter = jsElement.Deserialize(parameter); command.Parameter = jsElement.Deserialize(parameter);
} }
Console.WriteLine($"Calling command execution {command.CommandId}");
var response = _executeModule!.Execute(command, _contextRepo); var response = _executeModule!.Execute(command, _contextRepo);
response.ClientId = clientId; response.ClientId = clientId;
var resultType = response is FinalCommandExecution var resultType = response is FinalCommandExecution
@@ -41,13 +41,11 @@ public class JsonFrontendSerialisationModule
throw new Exception("Interaction module not initialized"); throw new Exception("Interaction module not initialized");
var receiveMessage = await _interactionModule.ReceiveMessage(); var receiveMessage = await _interactionModule.ReceiveMessage();
Console.WriteLine($"Received message: {Encoding.UTF8.GetString(receiveMessage)}");
var message = JsonSerializer.Deserialize<NetworkMessage>(receiveMessage)!; var message = JsonSerializer.Deserialize<NetworkMessage>(receiveMessage)!;
while (message.Id != requestId) while (message.Id != requestId)
{ {
receiveMessage = await _interactionModule.ReceiveMessage(); receiveMessage = await _interactionModule.ReceiveMessage();
Console.WriteLine($"Received message again: {Encoding.UTF8.GetString(receiveMessage)}");
message = JsonSerializer.Deserialize<NetworkMessage>(receiveMessage)!; message = JsonSerializer.Deserialize<NetworkMessage>(receiveMessage)!;
} }
@@ -66,7 +64,6 @@ public class JsonFrontendSerialisationModule
if (_interactionModule is null) if (_interactionModule is null)
throw new Exception("Interaction module not initialized"); throw new Exception("Interaction module not initialized");
Console.WriteLine($"PostCallRequest: {JsonSerializer.Serialize(callRequest)}");
var post = JsonSerializer.SerializeToUtf8Bytes(callRequest, callRequest.GetType()); var post = JsonSerializer.SerializeToUtf8Bytes(callRequest, callRequest.GetType());
_interactionModule.PostMessage(JsonSerializer.SerializeToUtf8Bytes(new NetworkMessage _interactionModule.PostMessage(JsonSerializer.SerializeToUtf8Bytes(new NetworkMessage