HttpRoute Class

Represents a route class for self-host (i.e. hosted outside of ASP.NET).

System.Object
  System.Web.Http.Routing.HttpRoute

Namespace:  System.Web.Http.Routing
Assembly:  System.Web.Http (in System.Web.Http.dll)

public class HttpRoute : IHttpRoute

The HttpRoute type exposes the following members.

  NameDescription
Public methodHttpRoute()Initializes a new instance of the HttpRoute class.
Public methodHttpRoute(String)Initializes a new instance of the HttpRoute class.
Public methodHttpRoute(String, HttpRouteValueDictionary)Initializes a new instance of the HttpRoute class.
Public methodHttpRoute(String, HttpRouteValueDictionary, HttpRouteValueDictionary)Initializes a new instance of the HttpRoute class.
Public methodHttpRoute(String, HttpRouteValueDictionary, HttpRouteValueDictionary, HttpRouteValueDictionary)Initializes a new instance of the HttpRoute class.
Public methodHttpRoute(String, HttpRouteValueDictionary, HttpRouteValueDictionary, HttpRouteValueDictionary, HttpMessageHandler)Initializes a new instance of the HttpRoute class.
Top

  NameDescription
Public propertyConstraintsGets the constraints for the route parameters.
Public propertyDataTokensGets any additional data tokens not used directly to determine whether a route matches an incoming HttpRequestMessage.
Public propertyDefaultsGets the default values for route parameters if not provided by the incoming HttpRequestMessage.
Public propertyHandlerGets or sets the http route handler.
Public propertyRouteTemplateGets the route template describing the URI pattern to match against.
Top

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetRouteDataDetermines whether this route is a match for the incoming request by looking up the HttpRouteData for the route.
Public methodGetType (Inherited from Object.)
Public methodGetVirtualPathAttempts to generate a URI that represents the values passed in based on current values from the HttpRouteData and new values using the specified HttpRoute.
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodProcessConstraintDetermines whether this instance equals a specified route.
Public methodToString (Inherited from Object.)
Top

This class is mostly the same as the Route implementation. This class has the same URL matching functionality as Route. However, in order for this route to match when generating URLs, a special "httproute" key must be specified when generating the URL.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: