Class RouteVerbResolver
Handles a HTTP request by matching it against a route, possibly handling different HTTP methods via different handlers.
Inherited Members
Namespace: EmbedIO.Routing
Syntax
public sealed class RouteVerbResolver : RouteResolverBase<HttpVerb>
Constructors
RouteVerbResolver(RouteMatcher)
Initializes a new instance of the RouteVerbResolver class.
Declaration
public RouteVerbResolver(RouteMatcher matcher)
Parameters
Type | Name | Description |
---|---|---|
RouteMatcher | matcher | The RouteMatcher to match URL paths against. |
Methods
GetContextData(IHttpContext)
Called by ResolveAsync(IHttpContext) to extract data from a context.
The extracted data are then used to select which handlers are suitable to handle the context.
Declaration
protected override HttpVerb GetContextData(IHttpContext context)
Parameters
Type | Name | Description |
---|---|---|
IHttpContext | context | The HTTP context to extract data from. |
Returns
Type | Description |
---|---|
HttpVerb | The extracted data. |
Overrides
EmbedIO.Routing.RouteResolverBase<EmbedIO.HttpVerb>.GetContextData(EmbedIO.IHttpContext)
See Also
MatchContextData(TData, TData)
MatchContextData(HttpVerb, HttpVerb)
Called by ResolveAsync(IHttpContext) to match data extracted from a context against data associated with a handler.
Declaration
protected override bool MatchContextData(HttpVerb contextData, HttpVerb handlerData)
Parameters
Type | Name | Description |
---|---|---|
HttpVerb | contextData | |
HttpVerb | handlerData |
Returns
Type | Description |
---|---|
Boolean | true if the handler should be called to handle the context; otherwise, false. |
Overrides
EmbedIO.Routing.RouteResolverBase<EmbedIO.HttpVerb>.MatchContextData(EmbedIO.HttpVerb, EmbedIO.HttpVerb)