using System; namespace EmbedIO.Routing { /// /// Handles a HTTP request by matching it against a route, /// possibly handling different HTTP methods via different handlers. /// public sealed class RouteVerbResolver : RouteResolverBase { /// /// Initializes a new instance of the class. /// /// The to match URL paths against. /// /// is . /// public RouteVerbResolver(RouteMatcher matcher) : base(matcher) { } /// protected override HttpVerbs GetContextData(IHttpContext context) => context.Request.HttpVerb; /// protected override bool MatchContextData(HttpVerbs contextVerb, HttpVerbs handlerVerb) => handlerVerb == HttpVerbs.Any || contextVerb == handlerVerb; } }