private RouteHandler AddRouteHandler(IModule module, string [] patterns, Method [] methods) { if (module == null) throw new ArgumentNullException ("module"); if (patterns == null) throw new ArgumentNullException ("patterns"); if (methods == null) throw new ArgumentNullException ("methods"); module.StartInternal (); module.Routes.MatchOps = SimpleOpsForPatterns (patterns); module.Routes.Methods = methods; Routes.Children.Add (module.Routes); return module.Routes; }
private RouteHandler AddImplicitRouteHandlerForModule(IModule module, IMatchOperation [] ops, Method [] methods) { module.StartInternal (); module.Routes.IsImplicit = true; module.Routes.MatchOps = ops; module.Routes.Methods = methods; Routes.Children.Add (module.Routes); return module.Routes; }