RouteDirection Enum
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.
Indicates whether ASP.NET routing is processing a URL from a client or generating a URL.
public enum class RouteDirection
public enum RouteDirection
type RouteDirection =
Public Enum RouteDirection
- Inheritance
Fields
IncomingRequest | 0 | A URL from a client is being processed. |
UrlGeneration | 1 | A URL is being created based on the route definition. |
Remarks
You can use ASP.NET routing to process a URL by matching it to the route definitions in an ASP.NET application, or to generate URLs that are based on the route definitions. The RouteDirection enumeration provides values that help you differentiate between these scenarios. This is useful because route constraints are processed differently depending on the scenario. If you create a custom route constraint by implementing the IRouteConstraint interface, you might have to check the value of the routeDirection
parameter in the Match method to differentiate the scenarios.
Applies to
See also
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應