KestrunHostMapExtensions class

Provides extension methods for mapping routes and handlers to the KestrunHost.

public static class KestrunHostMapExtensions

Public Members

name description
static AddHtmlTemplateRoute(…) Adds an HTML template route to the KestrunHost for the specified pattern and HTML file path. (2 methods)
static AddMapRoute(…) Adds a native route to the KestrunHost for the specified pattern and HTTP verb. (6 methods)
static AddStaticMapOverride(…) Adds a static override route to the KestrunHost for the specified pattern and handler. This allows you to override static file serving with dynamic content. Call this method before adding static file components to ensure it takes precedence. (4 methods)
static GetMapRouteOptions(…) Retrieves the MapRouteOptions associated with a given route pattern and HTTP verb, if registered.
static MapExists(…) Checks if a route with the specified pattern and optional HTTP method exists in the KestrunHost. (2 methods)
delegate KestrunHandler Represents a delegate that handles a Kestrun request with the provided context.

See Also