public IActionResult Index() { ActionRequestHandler req = new ActionRequestHandler( this, LoginRoutes.Index); return(req.Handle()); }
public IActionResult Twitch() { ActionRequestHandler req = new ActionRequestHandler( this, LoginRoutes.Twitch); return(req.Handle()); }
public IActionResult BitbarSubmit() { ActionRequestHandler req = new ActionRequestHandler( this, StreamkitRoutes.BitbarSubmit); return(req.Handle()); }
public IActionResult Subscribers() { ActionRequestHandler req = new ActionRequestHandler( this, HomeRoutes.Subscribers); return(req.Handle()); }
public IActionResult Privacy() { ActionRequestHandler req = new ActionRequestHandler( this, HomeRoutes.Privacy); return(req.Handle()); }
/// <summary> /// Register handler with delegate /// </summary> /// <typeparam name="TRequest"></typeparam> /// <param name="action"></param> public void AddRequestHandler <TRequest>(Func <TRequest, IRequestHandlerContext, Task> action) where TRequest : IRequestTrigger { var eventHandler = new ActionRequestHandler <TRequest>(action); AddRequestHandler <TRequest>(new SingletonHandlerFactory(eventHandler, typeof(TRequest))); }
/// <summary> /// Register dynamic handler with delegate /// </summary> /// <param name="eventName"></param> /// <param name="action"></param> public void AddDynamicRequestHandler(string eventName, Func <dynamic, IRequestHandlerContext, Task> action) { var eventHandler = new ActionRequestHandler(action); DoAddRequestHandler(new SingletonHandlerFactory(eventHandler), eventName: eventName); }