file scoped namespaces (#565)
This commit is contained in:
@@ -6,21 +6,20 @@ using Wino.Core.Domain.Models.Server;
|
||||
using Wino.Messaging.Server;
|
||||
using Wino.Server.Core;
|
||||
|
||||
namespace Wino.Server.MessageHandlers
|
||||
namespace Wino.Server.MessageHandlers;
|
||||
|
||||
public class TerminateServerRequestHandler : ServerMessageHandler<TerminateServerRequested, bool>
|
||||
{
|
||||
public class TerminateServerRequestHandler : ServerMessageHandler<TerminateServerRequested, bool>
|
||||
public override WinoServerResponse<bool> FailureDefaultResponse(Exception ex) => WinoServerResponse<bool>.CreateErrorResponse(ex.Message);
|
||||
|
||||
protected override Task<WinoServerResponse<bool>> HandleAsync(TerminateServerRequested message, CancellationToken cancellationToken = default)
|
||||
{
|
||||
public override WinoServerResponse<bool> FailureDefaultResponse(Exception ex) => WinoServerResponse<bool>.CreateErrorResponse(ex.Message);
|
||||
// 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.
|
||||
|
||||
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.
|
||||
Log.Information("Terminate server is requested by client. Killing server.");
|
||||
|
||||
Log.Information("Terminate server is requested by client. Killing server.");
|
||||
|
||||
return Task.FromResult(WinoServerResponse<bool>.CreateSuccessResponse(true));
|
||||
}
|
||||
return Task.FromResult(WinoServerResponse<bool>.CreateSuccessResponse(true));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user