private RouteHandler AddImplicitRouteHandler(ManosModule module, string [] patterns, HttpMethod [] methods) { module.Routes.IsImplicit = true; module.Routes.Patterns = patterns; module.Routes.Methods = methods; Routes.Children.Add(module.Routes); return(module.Routes); }
public void TestAddRouteNull() { ManosModule m = new ManosModule (); Should.Throw<ArgumentNullException> (() => m.Route (new ManosModule (), null, null)); Should.Throw<ArgumentNullException> (() => m.Route (new ManosAction (FakeAction), null, null)); Should.Throw<ArgumentNullException> (() => m.Route (null, new ManosAction (FakeAction))); Should.Throw<ArgumentNullException> (() => m.Route (null, new ManosModule ())); }
private RouteHandler AddRouteHandler(ManosModule module, string [] patterns, HttpMethod [] methods) { if (module == null) { throw new ArgumentNullException("module"); } if (patterns == null) { throw new ArgumentNullException("patterns"); } if (methods == null) { throw new ArgumentNullException("methods"); } module.Routes.Patterns = patterns; module.Routes.Methods = methods; Routes.Children.Add(module.Routes); return(module.Routes); }
public RouteHandler Trace(ManosModule module, params string [] patterns) { return(AddRouteHandler(module, patterns, HttpMethods.TraceMethods)); }
// public RouteHandler Trace(string pattern, ManosModule module) { return(AddRouteHandler(module, new string [] { pattern }, HttpMethods.TraceMethods)); }
public RouteHandler Options(ManosModule module, params string [] patterns) { return(AddRouteHandler(module, patterns, HttpMethods.OptionsMethods)); }
// public RouteHandler Options(string pattern, ManosModule module) { return(AddRouteHandler(module, new string [] { pattern }, HttpMethods.OptionsMethods)); }
public RouteHandler Get(string pattern, ManosModule module) { return AddRouteHandler (module, new string [] { pattern }, HttpMethods.GetMethods); }
public RouteHandler Delete(ManosModule module, params string [] patterns) { return AddRouteHandler (module, patterns, HttpMethods.DeleteMethods); }
private RouteHandler AddRouteHandler(ManosModule module, string [] patterns, string [] methods) { if (module == null) throw new ArgumentNullException ("module"); if (patterns == null) throw new ArgumentNullException ("patterns"); if (methods == null) throw new ArgumentNullException ("methods"); module.Routes.Patterns = patterns; module.Routes.Methods = methods; Routes.Children.Add (module.Routes); return module.Routes; }
private RouteHandler AddImplicitRouteHandler(ManosModule module, string [] patterns, string [] methods) { module.Routes.IsImplicit = true; module.Routes.Patterns = patterns; module.Routes.Methods = methods; Routes.Children.Add (module.Routes); return module.Routes; }
public RouteHandler Post(ManosModule module, params string [] patterns) { return AddRouteHandler (module, patterns, HttpMethods.PostMethods); }
public RouteHandler Options(ManosModule module, params string [] patterns) { return AddRouteHandler (module, patterns, HttpMethods.OptionsMethods); }
// public RouteHandler Options(string pattern, ManosModule module) { return AddRouteHandler (module, new string [] { pattern }, HttpMethods.OptionsMethods); }