Example #1
0
        public void RegisterCustomAction(ControllerAction action,
                                         Func <HttpEntityManager, UriTemplateMatch, RequestParams> handler)
        {
            Ensure.NotNull(action, "action");
            Ensure.NotNull(handler, "handler");

            UriRouter.RegisterAction(action, handler);
        }
Example #2
0
        public void RegisterAction(ControllerAction action, Action <HttpEntityManager, UriTemplateMatch> handler)
        {
            Ensure.NotNull(action, "action");
            Ensure.NotNull(handler, "handler");

            UriRouter.RegisterAction(action, (man, match) => {
                handler(man, match);
                return(new RequestParams(ESConsts.HttpTimeout));
            });
        }