This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
RouteGroupConstraint should only be added once for non attribute routed actions #1035
Closed
Description
Given the following controllers and actions
private class MixedAttributeRouteController
{
[HttpGet("Index")]
public void Index() { }
[HttpGet("Edit")]
public void Edit() { }
public void AnotherNonAttributedAction() { }
}
[MyRouteConstraint(blockNonAttributedActions: true)]
[MySecondRouteConstraint(blockNonAttributedActions: true)]
private class ConstrainedController
{
public void ConstrainedNonAttributedAction() { }
}
AnotherNonAttributedAction gets added once RouteGroupConstraint for each RouteDataConstraint defined in a Controller. So in the above example it will end up with two route data constraints.