bb887b0901
* callbacks * controllers * Router override * make requests use interface * create Routers * extra parts
44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
using Core.Annotations;
|
|
using Core.Callbacks;
|
|
using Core.DI;
|
|
using Core.Models.Eft.Common;
|
|
using Core.Models.Eft.Common.Request;
|
|
using Core.Utils;
|
|
|
|
namespace Core.Routers.Static;
|
|
|
|
[Injectable(InjectableTypeOverride = typeof(StaticRouter))]
|
|
public class NotifierStaticRouter : StaticRouter
|
|
{
|
|
protected static NotifierCallbacks _notifierCallbacks;
|
|
|
|
public NotifierStaticRouter(
|
|
JsonUtil jsonUtil,
|
|
NotifierCallbacks notifierCallbacks
|
|
) : base(
|
|
jsonUtil,
|
|
[
|
|
new RouteAction(
|
|
"/client/notifier/channel/create",
|
|
(
|
|
url,
|
|
info,
|
|
sessionID,
|
|
output
|
|
) => _notifierCallbacks.CreateNotifierChannel(url, info as EmptyRequestData, sessionID)),
|
|
new RouteAction(
|
|
"/client/game/profile/select",
|
|
(
|
|
url,
|
|
info,
|
|
sessionID,
|
|
output
|
|
) => _notifierCallbacks.SelectProfile(url, info as UIDRequestData, sessionID),
|
|
typeof(UIDRequestData)),
|
|
]
|
|
)
|
|
{
|
|
_notifierCallbacks = notifierCallbacks;
|
|
}
|
|
}
|