C# Class SwashbuckleODataSample.Versioning.ODataVersionRouteConstraint

Route constraint to allow constraint odata route by query string or headers which is partically used in versioning scenario. For example, you may set query string constraint to v=1 and the route that matching it will be considered as a v1 request and corresponding model will be used to server it
Inheritance: System.Web.OData.Routing.ODataPathRouteConstraint
Afficher le fichier Open project: rbeauchamp/Swashbuckle.OData Class Usage Examples

Méthodes publiques

Méthode Description
Match ( HttpRequestMessage request, IHttpRoute route, string parameterName, object>.IDictionary values, HttpRouteDirection routeDirection ) : bool
ODataVersionRouteConstraint ( string routeName, object queryConstraints, object headerConstraints ) : System.Collections.Generic

Method Details

Match() public méthode

public Match ( HttpRequestMessage request, IHttpRoute route, string parameterName, object>.IDictionary values, HttpRouteDirection routeDirection ) : bool
request System.Net.Http.HttpRequestMessage
route IHttpRoute
parameterName string
values object>.IDictionary
routeDirection HttpRouteDirection
Résultat bool

ODataVersionRouteConstraint() public méthode

public ODataVersionRouteConstraint ( string routeName, object queryConstraints, object headerConstraints ) : System.Collections.Generic
routeName string
queryConstraints object
headerConstraints object
Résultat System.Collections.Generic