1 type derived from HttpMethodActionConstraint
Microsoft.AspNetCore.Mvc.Cors (1)
CorsHttpMethodActionConstraint.cs (1)
10internal sealed class CorsHttpMethodActionConstraint : HttpMethodActionConstraint
12 instantiations of HttpMethodActionConstraint
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
DefaultApiDescriptionProviderTest.cs (2)
143new HttpMethodActionConstraint(new string[] { "PUT", "POST" }), 144new HttpMethodActionConstraint(new string[] { "GET" }),
Microsoft.AspNetCore.Mvc.Core (1)
ApplicationModels\DefaultApplicationModelProvider.cs (1)
640selectorModel.ActionConstraints.Add(new HttpMethodActionConstraint(httpMethods));
Microsoft.AspNetCore.Mvc.Core.Test (5)
ActionConstraints\HttpMethodActionConstraintTest.cs (2)
29var constraint = new HttpMethodActionConstraint(httpMethods); 45var constraint = new HttpMethodActionConstraint(httpMethods);
ApplicationModels\ActionModelTest.cs (1)
69selectorModel.ActionConstraints.Add(new HttpMethodActionConstraint(new string[] { "GET" }));
ApplicationModels\ControllerModelTest.cs (1)
73selectorModel.ActionConstraints.Add(new HttpMethodActionConstraint(new string[] { "GET" }));
Infrastructure\ActionSelectorTest.cs (1)
527new HttpMethodActionConstraint(new string[] { "POST" }),
Microsoft.AspNetCore.Mvc.Cors.Test (3)
CorsHttpMethodActionConstraintTest.cs (3)
30var constraint = new CorsHttpMethodActionConstraint(new HttpMethodActionConstraint(httpMethods)) as IActionConstraint; 45var constraint = new CorsHttpMethodActionConstraint(new HttpMethodActionConstraint(new[] { "GET", "Post" })) as IActionConstraint; 61var constraint = new CorsHttpMethodActionConstraint(new HttpMethodActionConstraint(httpMethods)) as IActionConstraint;
Microsoft.AspNetCore.Mvc.Test (1)
Routing\ActionConstraintMatcherPolicyTest.cs (1)
385new HttpMethodActionConstraint(new[]{ "GET", }),
55 references to HttpMethodActionConstraint
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
DefaultApiDescriptionProvider.cs (1)
367return action.ActionConstraints.OfType<HttpMethodActionConstraint>().SelectMany(c => c.HttpMethods);
Microsoft.AspNetCore.Mvc.Core (6)
ActionConstraints\HttpMethodActionConstraint.cs (3)
12/// support. The <see cref="HttpMethodActionConstraint" /> can be used to determine 18/// The <see cref="IActionConstraint.Order" /> value used by <see cref="HttpMethodActionConstraint" />. 25/// Creates a new instance of <see cref="HttpMethodActionConstraint" />.
ApplicationModels\ApplicationModelFactory.cs (1)
303var verbs = selector.ActionConstraints?.OfType<HttpMethodActionConstraint>().FirstOrDefault()?.HttpMethods;
Routing\ActionConstraintMatcherPolicy.cs (1)
58if (actionConstraint.GetType() == typeof(HttpMethodActionConstraint))
Routing\ActionEndpointFactory.cs (1)
418if (actionConstraint is HttpMethodActionConstraint httpMethodActionConstraint &&
Microsoft.AspNetCore.Mvc.Core.Test (36)
ActionConstraints\HttpMethodActionConstraintTest.cs (3)
29var constraint = new HttpMethodActionConstraint(httpMethods); 45var constraint = new HttpMethodActionConstraint(httpMethods); 56private static ActionConstraintContext CreateActionConstraintContext(HttpMethodActionConstraint constraint)
ApplicationModels\ControllerActionDescriptorProviderTests.cs (13)
94var constraint = Assert.IsType<HttpMethodActionConstraint>(Assert.Single(descriptor.ActionConstraints)); 111var constraint = Assert.IsType<HttpMethodActionConstraint>(Assert.Single(descriptor.ActionConstraints)); 486var methodConstraint = Assert.IsType<HttpMethodActionConstraint>(Assert.Single(action.ActionConstraints)); 511var methodConstraint = Assert.IsType<HttpMethodActionConstraint>(Assert.Single(action.ActionConstraints)); 546a => a.ActionConstraints.OfType<HttpMethodActionConstraint>().Single().HttpMethods.Single() == "PUT"); 553a => a.ActionConstraints.OfType<HttpMethodActionConstraint>().Single().HttpMethods.Single() == "POST"); 585a => a.ActionConstraints.OfType<HttpMethodActionConstraint>().Single().HttpMethods.Single() == "POST"); 592a => a.ActionConstraints.OfType<HttpMethodActionConstraint>().Single().HttpMethods.Single() == "PUT"); 647.OfType<HttpMethodActionConstraint>()
ApplicationModels\DefaultApplicationModelProviderTest.cs (20)
760Assert.Empty(action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 779action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 803action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 828action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 851action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 874action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 926action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 966var methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 971methodConstraint = Assert.Single(all.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1040var methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1066action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 1088var methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1092methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1111var methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1115methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1119methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1138var methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1142methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1162var methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1166methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>());
Microsoft.AspNetCore.Mvc.Cors (2)
CorsApplicationModelProvider.cs (1)
100if (actionConstraints[j] is HttpMethodActionConstraint httpConstraint)
CorsHttpMethodActionConstraint.cs (1)
15public CorsHttpMethodActionConstraint(HttpMethodActionConstraint constraint)
Microsoft.AspNetCore.Mvc.Cors.Test (10)
CorsApplicationModelProviderTest.cs (10)
37var constraint = Assert.Single(selector.ActionConstraints, c => c is HttpMethodActionConstraint); 56var constraint = Assert.Single(selector.ActionConstraints, c => c is HttpMethodActionConstraint); 74var constraint = Assert.Single(selector.ActionConstraints, c => c is HttpMethodActionConstraint); 93var constraint = Assert.Single(selector.ActionConstraints, c => c is HttpMethodActionConstraint); 112var constraint = Assert.Single(selector.ActionConstraints, c => c is HttpMethodActionConstraint); 130var constraint = Assert.Single(selector.ActionConstraints, c => c is HttpMethodActionConstraint); 151var constraint = Assert.Single(selector.ActionConstraints, c => c is HttpMethodActionConstraint); 170var constraint = Assert.Single(selector.ActionConstraints, c => c is HttpMethodActionConstraint); 189var constraint = Assert.Single(selector.ActionConstraints, c => c is HttpMethodActionConstraint); 207var constraint = Assert.Single(selector.ActionConstraints, c => c is HttpMethodActionConstraint);