mirror of
https://gitea.tendokyu.moe/Kayori/Medusa.net.git
synced 2026-09-29 18:28:10 +03:00
- Refactor handler dispatch to use a parsed GameModel instead of raw model strings (Handler.cs, HandlerService.cs, new GameModel.cs) - Add a Unity asset-extraction subsystem (Abstractions/Extractors/Unity) - Add WriteEventLogHandler, XrpcDouble serialization type - Rename EaCoin*Handler -> *EaCoinHandler for naming consistency - Add PIN/username update and forgot/reset password flows, with a console-logging IEmailSender until real email is wired up - Add a settings page and a theming pass (theme tokens, tailwind config) - Add plugin nav/route/UI-manifest frontend types
49 lines
1.6 KiB
C#
49 lines
1.6 KiB
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using System.Xml.Linq;
|
|
|
|
namespace Abstractions.Handlers;
|
|
|
|
public abstract partial class Handler<TRequest, TResponse>: BaseHandler where TRequest : notnull
|
|
{
|
|
|
|
// protected void Module(string module)
|
|
// {
|
|
// this.HandlerModule = module;
|
|
// }
|
|
//
|
|
// protected void Method(string method)
|
|
// {
|
|
// this.HandlerMethod = method;
|
|
// }
|
|
//
|
|
// protected void GameCode(string gameCode)
|
|
// {
|
|
// this.HandlerGameCode = gameCode;
|
|
// }
|
|
//
|
|
// protected void MinVer(string minVer)
|
|
// {
|
|
// this.HandlerMinVer = minVer;
|
|
// }
|
|
//
|
|
// protected void MaxVer(string maxVer)
|
|
// {
|
|
// this.HandlerMaxVer = maxVer;
|
|
// }
|
|
|
|
public virtual TResponse Handle(TRequest req, GameModel model) { throw new NotImplementedException("Handle method not implemented."); }
|
|
public virtual Task<TResponse> HandleAsync(TRequest req, GameModel model) { throw new NotImplementedException("Handle method not implemented."); }
|
|
}
|
|
|
|
public abstract class HandlerWithoutRequest<TResponse> : Handler<EmptyRequest, TResponse>
|
|
{
|
|
public virtual TResponse Handle(GameModel model) { throw new NotImplementedException("Handle method not implemented."); }
|
|
public virtual Task<TResponse> HandleAsync(GameModel model) { throw new NotImplementedException("Handle method not implemented."); }
|
|
|
|
public sealed override Task<TResponse> HandleAsync(EmptyRequest _, GameModel model)
|
|
=> HandleAsync(model);
|
|
|
|
public sealed override TResponse Handle(EmptyRequest _, GameModel model)
|
|
=> Handle(model);
|
|
} |