Skip to main content

NavigatorRouteCollection

Namespace: Wisej.Web.Ext.Navigator

Assembly: Wisej.Web.Ext.Navigator (4.1.0.0)

Represents the collection of routes registered with the Navigator.

public class NavigatorRouteCollection

Routes are stored by path without the leading "/" and without the argument patterns. Use Routes to access the collection of the current session.

Constructors​

Initializes a new instance of NavigatorRouteCollection.

Properties​

Instance member Item(path)​

NavigatorRouteEntry: Returns or sets the NavigatorRouteEntry that matches the specified path .

Value: The route registered with path ; otherwise the registered route with the longest path that path starts with (case insensitive), or null when there is no match.

Since the "/" route (the home page) is registered with an empty path, it matches any path that doesn't match a longer route.

The setter adds or replaces the entry stored for path ; setting it to null removes the route.

Throws:

Example:

Looking up the route that handles a URL:

// "customer/{id}" is stored as "customer/".
var entry = Navigator.Routes["customer/1042"];
if (entry != null)
AlertBox.Show("Mode: " + entry.ViewMode);