C# Class BlueCollar.Dashboard.DashboardRouter

Provides simple static routing for the dashboard.
Show file Open project: ChadBurggraf/blue-collar Class Usage Examples

Public Methods

Method Description
GetHandler ( string verb, string handlerRelativeUrl, IRepositoryFactory repositoryFactory ) : IDashboardHandler

Gets the IDashboardHandler mapped to the route identified by the given verb and handler-relative URL.

GetRoute ( string verb, string handlerRelativeUrl ) : IDashboardRoute

Gets the IDashboardRoute matching the given verb and handler-relative URL.

NormalizeHandlerRelativeUrl ( string handlerRelativeUrl ) : string

Normalizes a handler-relative URL in preparation for route matching.

NormalizeVerb ( string verb ) : string

Normalizes an HTTP verb in preparation for route matching.

Method Details

GetHandler() public static method

Gets the IDashboardHandler mapped to the route identified by the given verb and handler-relative URL.
public static GetHandler ( string verb, string handlerRelativeUrl, IRepositoryFactory repositoryFactory ) : IDashboardHandler
verb string The verb to get the handler for.
handlerRelativeUrl string The handler-relative URL to get the handler for.
repositoryFactory IRepositoryFactory The repository factory to use when instantiating the handler.
return IDashboardHandler

GetRoute() public static method

Gets the IDashboardRoute matching the given verb and handler-relative URL.
public static GetRoute ( string verb, string handlerRelativeUrl ) : IDashboardRoute
verb string The verb to get the route for.
handlerRelativeUrl string The handler-relative URL to get the verb for.
return IDashboardRoute

NormalizeHandlerRelativeUrl() public static method

Normalizes a handler-relative URL in preparation for route matching.
public static NormalizeHandlerRelativeUrl ( string handlerRelativeUrl ) : string
handlerRelativeUrl string The handler-relative URL to normalize.
return string

NormalizeVerb() public static method

Normalizes an HTTP verb in preparation for route matching.
public static NormalizeVerb ( string verb ) : string
verb string The HTTP verb string to normalize.
return string