16 references to HttpMethods
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
DefaultApiDescriptionProvider.cs (1)
367return action.ActionConstraints.OfType<HttpMethodActionConstraint>().SelectMany(c => c.HttpMethods);
Microsoft.AspNetCore.Mvc.Core (2)
ApplicationModels\ApplicationModelFactory.cs (1)
303var verbs = selector.ActionConstraints?.OfType<HttpMethodActionConstraint>().FirstOrDefault()?.HttpMethods;
Routing\ActionEndpointFactory.cs (1)
421builder.Metadata.Add(new HttpMethodMetadata(httpMethodActionConstraint.HttpMethods));
Microsoft.AspNetCore.Mvc.Core.Test (11)
ApplicationModels\ControllerActionDescriptorProviderTests.cs (11)
95Assert.Equal(new string[] { "POST" }, constraint.HttpMethods); 112Assert.Equal(new string[] { "PUT", "PATCH" }, constraint.HttpMethods); 488Assert.NotNull(methodConstraint.HttpMethods); 489Assert.Equal(new[] { "POST" }, methodConstraint.HttpMethods); 513Assert.NotNull(methodConstraint.HttpMethods); 514Assert.Equal(new[] { "PUT" }, methodConstraint.HttpMethods); 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"); 648.SelectMany(c => c.HttpMethods)
Microsoft.AspNetCore.Mvc.Cors (2)
CorsHttpMethodActionConstraint.cs (2)
16: base(constraint.HttpMethods) 24var methods = (ReadOnlyCollection<string>)HttpMethods;