ODataVersionConstraint Class
An implementation of IHttpRouteConstraint that only matches a specific OData protocol version. This constraint won't match incomming requests that contain any of the previous OData version headers (for OData versions 1.0 to 3.0) regardless of the version in the current version headers.
Namespace: System.Web.OData.Routing
Assembly: System.Web.OData (in System.Web.OData.dll)
Inheritance Hierarchy
System.Object
System.Web.OData.Routing.ODataVersionConstraint
Syntax
public class ODataVersionConstraint : IHttpRouteConstraint
public ref class ODataVersionConstraint : IHttpRouteConstraint
type ODataVersionConstraint =
class
interface IHttpRouteConstraint
end
Public Class ODataVersionConstraint
Implements IHttpRouteConstraint
Constructors
Name | Description | |
---|---|---|
ODataVersionConstraint() | Creates a new instance of the ODataVersionConstraint class that will have a default version of 4.0. |
Properties
Name | Description | |
---|---|---|
IsRelaxedMatch | If set to true, allow passing in both OData V4 and previous version headers. |
|
Version | The version of the OData protocol that an OData-Version or OData-MaxVersion request header must have in order to be processed by the OData service with this route constraint. |
Methods
Name | Description | |
---|---|---|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
Match(HttpRequestMessage, IHttpRoute, String, IDictionary<String, Object>, HttpRouteDirection) | ||
MemberwiseClone() | (Inherited from Object.) |
|
ToString() | (Inherited from Object.) |
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.OData.Routing Namespace
Return to top