Files
SPT-Server-Build/Core/Routers/Static/BotStaticRouter.cs
T
2025-01-12 15:32:26 +00:00

35 lines
828 B
C#

using Core.Annotations;
using Core.Callbacks;
using Core.DI;
using Core.Models.Eft.Bot;
using Core.Utils;
namespace Core.Routers.Static;
[Injectable(InjectableTypeOverride = typeof(StaticRouter))]
public class BotStaticRouter : StaticRouter
{
protected static BotCallbacks _botCallbacks;
public BotStaticRouter(
JsonUtil jsonUtil,
BotCallbacks botCallbacks
) : base(
jsonUtil,
[
new RouteAction(
"",
(
url,
info,
sessionID,
outout
) => _botCallbacks.GenerateBots(url, info as GenerateBotsRequestData, sessionID),
typeof(GenerateBotsRequestData))
]
)
{
_botCallbacks = botCallbacks;
}
}