Share via


HttpRoute Class

 

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

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

Inheritance Hierarchy

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

Syntax

public class HttpRoute : IHttpRoute
public ref class HttpRoute : IHttpRoute
type HttpRoute = 
    class
        interface IHttpRoute
    end
Public Class HttpRoute
    Implements IHttpRoute

Constructors

Name Description
System_CAPS_pubmethod HttpRoute()

Initializes a new instance of the HttpRoute class.

System_CAPS_pubmethod HttpRoute(String)

Initializes a new instance of the HttpRoute class.

System_CAPS_pubmethod HttpRoute(String, HttpRouteValueDictionary)

Initializes a new instance of the HttpRoute class.

System_CAPS_pubmethod HttpRoute(String, HttpRouteValueDictionary, HttpRouteValueDictionary)

Initializes a new instance of the HttpRoute class.

System_CAPS_pubmethod HttpRoute(String, HttpRouteValueDictionary, HttpRouteValueDictionary, HttpRouteValueDictionary)

Initializes a new instance of the HttpRoute class.

System_CAPS_pubmethod HttpRoute(String, HttpRouteValueDictionary, HttpRouteValueDictionary, HttpRouteValueDictionary, HttpMessageHandler)

Initializes a new instance of the HttpRoute class.

Properties

Name Description
System_CAPS_pubproperty Constraints

Gets the constraints for the route parameters.

System_CAPS_pubproperty DataTokens

Gets any additional data tokens not used directly to determine whether a route matches an incoming HttpRequestMessage.

System_CAPS_pubproperty Defaults

Gets the default values for route parameters if not provided by the incoming HttpRequestMessage.

System_CAPS_pubproperty Handler

Gets or sets the http route handler.

System_CAPS_pubproperty RouteTemplate

Gets the route template describing the URI pattern to match against.

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetRouteData(String, HttpRequestMessage)

Determines whether this route is a match for the incoming request by looking up the HttpRouteData for the route.

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod GetVirtualPath(HttpRequestMessage, IDictionary<String, Object>)

Attempts to generate a URI that represents the values passed in based on current values from the HttpRouteData and new values using the specified HttpRoute.

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethod ProcessConstraint(HttpRequestMessage, Object, String, HttpRouteValueDictionary, HttpRouteDirection)

Determines whether this instance equals a specified route.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Fields

Name Description
System_CAPS_pubfieldSystem_CAPS_static HttpRouteKey

Specifies the HTTP route key.

Thread Safety

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

See Also

System.Web.Http.Routing Namespace

Return to top