예제 #1
0
        public IActionResult Index()
        {
            ActionRequestHandler req = new ActionRequestHandler(
                this, LoginRoutes.Index);

            return(req.Handle());
        }
예제 #2
0
        public IActionResult Twitch()
        {
            ActionRequestHandler req = new ActionRequestHandler(
                this, LoginRoutes.Twitch);

            return(req.Handle());
        }
예제 #3
0
        public IActionResult BitbarSubmit()
        {
            ActionRequestHandler req = new ActionRequestHandler(
                this, StreamkitRoutes.BitbarSubmit);

            return(req.Handle());
        }
예제 #4
0
        public IActionResult Subscribers()
        {
            ActionRequestHandler req = new ActionRequestHandler(
                this, HomeRoutes.Subscribers);

            return(req.Handle());
        }
예제 #5
0
        public IActionResult Privacy()
        {
            ActionRequestHandler req = new ActionRequestHandler(
                this, HomeRoutes.Privacy);

            return(req.Handle());
        }
예제 #6
0
        /// <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)));
        }
예제 #7
0
        /// <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);
        }