Nancy.RouteHelpers/RouteParameters.cs
/// <summary>
/// Creates a route that expects at least one integer, for example, /products/123
/// </summary>
/// <param name="NamedGroup">The name of the parameter in the route</param>
/// <param name="lengthStart">The minimum number of integers in the route</param>
/// <param name="lengthEnd">The maximum number of integers in the route</param>
/// <returns></returns>
Creates a route that expects at least one integer, for example, /products/123
Creates a route that expects at least one integer for example / products / 123
public RouteParameters AnyIntAtLeastOnce(string NamedGroup, int lengthStart, int lengthEnd)
        {
            RouteBuilder.Append(@"(?<" + NamedGroup + @">[\d]{" + lengthStart + "," + lengthEnd + "})");
            return this;
        }
public RouteParameters AnyIntAtLeastOnce ( string NamedGroup , int lengthStart , int lengthEnd ) { RouteBuilder . Append ( @"(?<" + NamedGroup + @">[\d]{" + lengthStart + " " + lengthEnd + " " ) ; return this ; }
Creates a route that expects at least one integer, for example, /products/123
Creates a route that expects at least one integer for example / products / 123
None
NamedGroup
string
The name of the parameter in the route
The name of the parameter in the route
lengthStart
int
The minimum number of integers in the route
The minimum number of integers in the route
lengthEnd
int
The maximum number of integers in the route
The maximum number of integers in the route