This change allows a user to override a route prefix set using
[Route("...")] on the controller by providing a route template
on the action that starts with "~/" or "/". For example,
[HttpGet("~/...")] or [HttpGet("/...")]
If the user specifies a template in [Route] that starts with "~/"
or "/", we will just strip the prefix from the template and use
the remaining part of the template.
The reason to do this is that there's a reasonable extensibility
scenario where a user can implement a global prefix for routes as
a convention (using IReflectedApplicationModelConvention), and use
~/ to escape that prefix (just like we support with action-level routes).
|
||
|---|---|---|
| .. | ||
| ActionResults | ||
| AntiXsrf | ||
| Extensions | ||
| Filters | ||
| ParameterBinding | ||
| Properties | ||
| ReflectedModelBuilder | ||
| Rendering | ||
| Routing | ||
| ActionAttributeTests.cs | ||
| ActionExecutorTests.cs | ||
| ActionSelectionConventionTests.cs | ||
| ControllerTests.cs | ||
| DefaultActionSelectorTest.cs | ||
| DefaultControllerActivatorTest.cs | ||
| DefaultControllerAssemblyProviderTests.cs | ||
| DefaultControllerFactoryTest.cs | ||
| JsonResultTest.cs | ||
| KnownRouteValueConstraintTests.cs | ||
| Microsoft.AspNet.Mvc.Core.Test.kproj | ||
| MockMvcOptionsAccessor.cs | ||
| MvcOptionsTests.cs | ||
| PropertyHelperTest.cs | ||
| ReflectedActionDescriptorProviderTests.cs | ||
| ReflectedActionInvokerTest.cs | ||
| StaticActionDiscoveryConventions.cs | ||
| TestController.cs | ||
| TypeHelperTest.cs | ||
| UrlHelperTest.cs | ||
| ViewComponentTests.cs | ||
| ViewResultTest.cs | ||
| project.json | ||