Skip to content
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
@javiercn

Description

@javiercn

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions