C# Class Nancy.RouteHelpers.Route

Show file Open project: jchannon/Nancy.RouteHelpers

Public Methods

Method Description
And ( ) : RouteParameters

Seperates route segments by adding a '/' to the route

AnyIntAtLeastOnce ( string NamedGroup ) : RouteParameters

Creates a route that expects at least one integer, for example, /products/123

AnyIntAtLeastOnce ( string NamedGroup, int lengthStart, int lengthEnd ) : RouteParameters

Creates a route that expects at least one integer, for example, /products/123

AnyIntOptional ( string NamedGroup ) : RouteParameters

Creates a route that will accept an int but the URL doesn't always have to contain one, for example, /products OR /products/123. NOTE: Do not use a / in your route before using this method as one is included

AnyStringAtLeastOnce ( string NamedGroup ) : RouteParameters

Creates a route that expects at least one string, for example, /mac

AnyStringAtLeastOnce ( string NamedGroup, int lengthStart, int lengthEnd ) : RouteParameters

Creates a route that expects at least one string, for example, /mac

AnyStringOptional ( string NamedGroup ) : RouteParameters

Creates a route that will accept a string but the URL doesn't always have to contain one, for example, /products OR /products/mac. NOTE: Do not use a / in your route before using this method as one is included

Exact ( string NamedGroup, string Exact ) : RouteParameters

Creates a route that expects a certain pattern

Root ( ) : RouteParameters

Starts route segments by adding a '/' to the route

Method Details

And() public static method

Seperates route segments by adding a '/' to the route
public static And ( ) : RouteParameters
return RouteParameters

AnyIntAtLeastOnce() public static method

Creates a route that expects at least one integer, for example, /products/123
public static AnyIntAtLeastOnce ( string NamedGroup ) : RouteParameters
NamedGroup string The name of the parameter in the route
return RouteParameters

AnyIntAtLeastOnce() public static method

Creates a route that expects at least one integer, for example, /products/123
public static AnyIntAtLeastOnce ( string NamedGroup, int lengthStart, int lengthEnd ) : RouteParameters
NamedGroup string The name of the parameter in the route
lengthStart int The minimum number of integers in the route
lengthEnd int The maximum number of integers in the route
return RouteParameters

AnyIntOptional() public static method

Creates a route that will accept an int but the URL doesn't always have to contain one, for example, /products OR /products/123. NOTE: Do not use a / in your route before using this method as one is included
public static AnyIntOptional ( string NamedGroup ) : RouteParameters
NamedGroup string The name of the parameter in the route
return RouteParameters

AnyStringAtLeastOnce() public static method

Creates a route that expects at least one string, for example, /mac
public static AnyStringAtLeastOnce ( string NamedGroup ) : RouteParameters
NamedGroup string The name of the parameter in the route
return RouteParameters

AnyStringAtLeastOnce() public static method

Creates a route that expects at least one string, for example, /mac
public static AnyStringAtLeastOnce ( string NamedGroup, int lengthStart, int lengthEnd ) : RouteParameters
NamedGroup string The name of the parameter in the route
lengthStart int The minimum number of characters in the route
lengthEnd int The minimum number of characters in the route
return RouteParameters

AnyStringOptional() public static method

Creates a route that will accept a string but the URL doesn't always have to contain one, for example, /products OR /products/mac. NOTE: Do not use a / in your route before using this method as one is included
public static AnyStringOptional ( string NamedGroup ) : RouteParameters
NamedGroup string The name of the parameter in the route
return RouteParameters

Exact() public static method

Creates a route that expects a certain pattern
public static Exact ( string NamedGroup, string Exact ) : RouteParameters
NamedGroup string The name of the parameter in the route
Exact string The exact pattern in the route
return RouteParameters

Root() public static method

Starts route segments by adding a '/' to the route
public static Root ( ) : RouteParameters
return RouteParameters