示例#1
0
 internal static void Parent(RouteScope parent)
 {
     if (parent == null)
     {
         throw Error.ArgumentNull("parent");
     }
 }
示例#2
0
        protected RouteScope(RouteScope parent, string controller = null, string url = null)
        {
            Require.Parent(parent);
            if (controller == "")
            {
                throw Error.ArgumentOutOfRange("controller");
            }
            // Allow null controller name

            this.parent     = parent;
            this.routes     = parent.routes;
            this.controller = controller ?? parent.controller;
            this.url        = CombineUrl(parent.url, url == null ? "" : ValidateUrl(url));
        }
 public TestableRouteScope(RouteScope parent, string controller = null, string url = null)
     : base(parent, controller, url)
 {
 }
示例#4
0
 internal UrlRouteBuilder(RouteScope parent, string url)
     : base(parent, url: RequireUrl(url))
 {
 }
示例#5
0
 internal RouteBuilder(RouteScope parent, string controller = null, string url = null)
     : base(parent, controller, url)
 {
 }
 internal ParameterRouteBuilder(RouteScope parent, string name)
     : base(parent, FormatParameter(name))
 {
     this.name = name;
 }