Пример #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));
        }
Пример #3
0
 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)
 {
 }
Пример #6
0
 internal ParameterRouteBuilder(RouteScope parent, string name)
     : base(parent, FormatParameter(name))
 {
     this.name = name;
 }