Exemplo n.º 1
0
        public AsyncRestHandlerRoute(string route, AsyncRestHandler handler, PathToRegexUtil.PathToRegexOptions options = null)
        {
            this.PatternKeys = new List <PathToRegexUtil.Token>();
            this.Pattern     = PathToRegexUtil.PathToRegex(
                route.StartsWith("/") ? route : ("/" + route),
                ref this.PatternKeys,
                options ?? DEFAULT_HANDLER_PATH_TO_REGEX_OPTIONS);

            this.TargetAction = null;
            this.ITarget      = null;
            this.Handler      = handler;
        }
Exemplo n.º 2
0
        public AsyncRestHandlerRoute(Regex pattern, AsyncRestHandler handler, PathToRegexUtil.PathToRegexOptions options = null)
        {
            this.PatternKeys = new List <PathToRegexUtil.Token>();
            this.Pattern     = PathToRegexUtil.PathToRegex(
                pattern,
                ref this.PatternKeys,
                options ?? DEFAULT_HANDLER_PATH_TO_REGEX_OPTIONS);

            this.TargetAction = null;
            this.ITarget      = null;
            this.Handler      = handler;
        }
Exemplo n.º 3
0
        public RestHandlerRoute(string route, IRestHandlerSingleTarget target, PathToRegexUtil.PathToRegexOptions options = null)
        {
            this.PatternKeys = new List <PathToRegexUtil.Token>();
            this.Pattern     = PathToRegexUtil.PathToRegex(
                route.StartsWith("/") ? route : ("/" + route),
                ref this.PatternKeys,
                options ?? DEFAULT_PATH_TO_REGEX_OPTIONS);

            this.TargetAction = null;
            this.ITarget      = target;
            this.Handler      = null;
        }
Exemplo n.º 4
0
        public RestHandlerRoute(Regex pattern, IRestHandlerSingleTarget target, PathToRegexUtil.PathToRegexOptions options = null)
        {
            this.PatternKeys = new List <PathToRegexUtil.Token>();
            this.Pattern     = PathToRegexUtil.PathToRegex(
                pattern,
                ref this.PatternKeys,
                options ?? DEFAULT_PATH_TO_REGEX_OPTIONS);

            this.TargetAction = null;
            this.ITarget      = target;
            this.Handler      = null;
        }
Exemplo n.º 5
0
 public void Patch(Regex routePattern, IRestHandlerSingleTarget target, PathToRegexUtil.PathToRegexOptions options = null)
 {
     AddRoute(@"PATCH", new RestHandlerRoute(routePattern, target, options ?? DefaultRouteOptions));
 }
Exemplo n.º 6
0
 public void Patch(Regex routePattern, RestHandler handler, PathToRegexUtil.PathToRegexOptions options = null)
 {
     AddRoute(@"PATCH", new RestHandlerRoute(routePattern, handler, options ?? DefaultHandlerRouteOptions));
 }
Exemplo n.º 7
0
 public void Patch(string route, RestHandlerRoute.Action action, PathToRegexUtil.PathToRegexOptions options = null)
 {
     AddRoute(@"PATCH", new RestHandlerRoute(route, action, options ?? DefaultRouteOptions));
 }
Exemplo n.º 8
0
 public void Options(string route, RestHandler handler, PathToRegexUtil.PathToRegexOptions options = null)
 {
     AddRoute(@"OPTIONS", new RestHandlerRoute(route, handler, options ?? DefaultHandlerRouteOptions));
 }
Exemplo n.º 9
0
 public void Options(string route, IRestHandlerSingleTarget target, PathToRegexUtil.PathToRegexOptions options = null)
 {
     AddRoute(@"OPTIONS", new RestHandlerRoute(route, target, options ?? DefaultRouteOptions));
 }
Exemplo n.º 10
0
 public void Options(Regex routePattern, RestHandlerRoute.Action action, PathToRegexUtil.PathToRegexOptions options = null)
 {
     AddRoute(@"OPTIONS", new RestHandlerRoute(routePattern, action, options ?? DefaultRouteOptions));
 }
Exemplo n.º 11
0
 public void Delete(Regex routePattern, RestHandler handler, PathToRegexUtil.PathToRegexOptions options = null)
 {
     AddRoute(@"DELETE", new RestHandlerRoute(routePattern, handler, options ?? DefaultHandlerRouteOptions));
 }