Revert "File scoped namespaces"

This reverts commit d31d8f574e.
This commit is contained in:
Burak Kaan Köse
2025-02-16 11:43:30 +01:00
parent d31d8f574e
commit cf9869b71e
617 changed files with 32097 additions and 31478 deletions

View File

@@ -6,20 +6,21 @@ using Wino.Core.Domain.Models.Server;
using Wino.Messaging.Server;
using Wino.Server.Core;
namespace Wino.Server.MessageHandlers;
public class TerminateServerRequestHandler : ServerMessageHandler<TerminateServerRequested, bool>
namespace Wino.Server.MessageHandlers
{
public override WinoServerResponse<bool> FailureDefaultResponse(Exception ex) => WinoServerResponse<bool>.CreateErrorResponse(ex.Message);
protected override Task<WinoServerResponse<bool>> HandleAsync(TerminateServerRequested message, CancellationToken cancellationToken = default)
public class TerminateServerRequestHandler : ServerMessageHandler<TerminateServerRequested, bool>
{
// This handler is only doing the logging right now.
// Client will always expect success response.
// Server will be terminated in the server context once the client gets the response.
public override WinoServerResponse<bool> FailureDefaultResponse(Exception ex) => WinoServerResponse<bool>.CreateErrorResponse(ex.Message);
Log.Information("Terminate server is requested by client. Killing server.");
protected override Task<WinoServerResponse<bool>> HandleAsync(TerminateServerRequested message, CancellationToken cancellationToken = default)
{
// This handler is only doing the logging right now.
// Client will always expect success response.
// Server will be terminated in the server context once the client gets the response.
return Task.FromResult(WinoServerResponse<bool>.CreateSuccessResponse(true));
Log.Information("Terminate server is requested by client. Killing server.");
return Task.FromResult(WinoServerResponse<bool>.CreateSuccessResponse(true));
}
}
}