DateTimeRouteConstraint Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Constrains a route parameter to represent only DateTime values.
public ref class DateTimeRouteConstraint : Microsoft::AspNetCore::Routing::IRouteConstraint
public class DateTimeRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint
public class DateTimeRouteConstraint : Microsoft.AspNetCore.Routing.IRouteConstraint, Microsoft.AspNetCore.Routing.Matching.IParameterLiteralNodeMatchingPolicy
type DateTimeRouteConstraint = class
interface IRouteConstraint
type DateTimeRouteConstraint = class
interface IRouteConstraint
interface IParameterPolicy
type DateTimeRouteConstraint = class
interface IParameterPolicy
interface IRouteConstraint
type DateTimeRouteConstraint = class
interface IRouteConstraint
interface IParameterPolicy
interface IParameterLiteralNodeMatchingPolicy
Public Class DateTimeRouteConstraint
Implements IRouteConstraint
Public Class DateTimeRouteConstraint
Implements IParameterLiteralNodeMatchingPolicy, IRouteConstraint
- Inheritance
-
DateTimeRouteConstraint
- Implements
Remarks
This constraint tries to parse strings by using all of the formats returned by the CultureInfo.InvariantCulture.DateTimeFormat.GetAllDateTimePatterns() method. For a sample on how to list all formats which are considered, please visit http://msdn.microsoft.com/en-us/library/aszyst2c(v=vs.110).aspx
Constructors
DateTimeRouteConstraint() |
Methods
Match(HttpContext, IRouter, String, RouteValueDictionary, RouteDirection) |
Determines whether the URL parameter contains a valid value for this constraint. |
Explicit Interface Implementations
IParameterLiteralNodeMatchingPolicy.MatchesLiteral(String, String) |