1 type derived from HttpMethodActionConstraint
Microsoft.AspNetCore.Mvc.Cors (1)
CorsHttpMethodActionConstraint.cs (1)
10internal sealed class CorsHttpMethodActionConstraint : HttpMethodActionConstraint
13 instantiations of HttpMethodActionConstraint
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
DefaultApiDescriptionProviderTest.cs (2)
172new HttpMethodActionConstraint(new string[] { "PUT", "POST" }), 173new HttpMethodActionConstraint(new string[] { "GET" }),
Microsoft.AspNetCore.Mvc.Core (1)
ApplicationModels\DefaultApplicationModelProvider.cs (1)
673selectorModel.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", }),
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiDocumentServiceTestsBase.cs (1)
239action.ActionConstraints = [new HttpMethodActionConstraint(action
68 references to HttpMethodActionConstraint
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
DefaultApiDescriptionProvider.cs (1)
379return 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 (49)
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 (33)
761Assert.Empty(action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 779var methodConstraint = Assert.Single( 780action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 803var methodConstraint = Assert.Single( 804action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 828var methodConstraint = Assert.Single( 829action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 851var methodConstraint = Assert.Single( 852action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 874var methodConstraint = Assert.Single( 875action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 926var methodConstraint = Assert.Single( 927action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 967var methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 972methodConstraint = Assert.Single(all.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1041var methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1066var methodConstraint = Assert.Single( 1067action.Selectors[0].ActionConstraints.OfType<HttpMethodActionConstraint>()); 1089var methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1093methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1112var methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1116methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1120methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1139var methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1143methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1163var methodConstraint = Assert.Single(selectorModel.ActionConstraints.OfType<HttpMethodActionConstraint>()); 1167methodConstraint = 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);