public void RegisterCustomAction(ControllerAction action, Func <HttpEntityManager, UriTemplateMatch, RequestParams> handler) { Ensure.NotNull(action, "action"); Ensure.NotNull(handler, "handler"); UriRouter.RegisterAction(action, handler); }
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)); }); }