4 implementations of IHttpMethodMetadata
Microsoft.AspNetCore.Routing (1)
HttpMethodMetadata.cs (1)
15public sealed class HttpMethodMetadata : IHttpMethodMetadata
Microsoft.AspNetCore.Routing.Tests (2)
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (1)
531private class HttpMethodAttribute : Attribute, IHttpMethodMetadata
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (1)
1146private class HttpMethodAttribute : Attribute, IHttpMethodMetadata
RoutingSandbox (1)
UseEndpointRoutingStartup.cs (1)
112private class HttpGetAttribute : Attribute, IHttpMethodMetadata
76 references to IHttpMethodMetadata
Microsoft.AspNetCore.Diagnostics (1)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
354var httpMethods = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods;
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (7)
JsonTranscodingServiceMethodProviderTests.cs (7)
30Assert.Equal("GET", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 46Assert.Equal("HEAD", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 61Assert.Equal("GET", getMethodModel.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 66Assert.Equal("DELETE", additionalMethodModel.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 81Assert.Equal("POST", startFrameImport.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 85Assert.Equal("POST", getFrameImport.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 157Assert.Equal("GET", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single());
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
EndpointMetadataApiDescriptionProvider.cs (1)
62routeEndpoint.Metadata.GetMetadata<IHttpMethodMetadata>() is { } httpMethodMetadata &&
Microsoft.AspNetCore.Mvc.Core.Test (2)
ApplicationModels\ControllerActionDescriptorProviderTests.cs (2)
328var lastHttpMethodMetadata = descriptor.EndpointMetadata.OfType<IHttpMethodMetadata>().Last();
Microsoft.AspNetCore.OpenApi (1)
Services\OpenApiGenerator.cs (1)
62if (metadata.GetMetadata<IHttpMethodMetadata>() is { } httpMethodMetadata &&
Microsoft.AspNetCore.Routing (12)
EndpointDataSource.cs (2)
123var httpMethodMetadata = routeEndpoint.Metadata.GetMetadata<IHttpMethodMetadata>();
Matching\HttpMethodMatcherPolicy.cs (8)
63if (endpoints[i].Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Count > 0) 99var metadata = candidates[i].Endpoint?.Metadata.GetMetadata<IHttpMethodMetadata>(); 300var metadata = e.Metadata.GetMetadata<IHttpMethodMetadata>(); 430private sealed class HttpMethodMetadataEndpointComparer : EndpointMetadataComparer<IHttpMethodMetadata> 432protected override int CompareMetadata(IHttpMethodMetadata? x, IHttpMethodMetadata? y)
RouteEndpointBuilder.cs (2)
70IHttpMethodMetadata? httpMethodMetadata = null; 80if (metadata[i] is IHttpMethodMetadata methodMetadata)
Microsoft.AspNetCore.Routing.Tests (52)
Builder\GroupTest.cs (6)
37var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 69var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 103var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>();
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (3)
420Assert.Equal("BUILDER", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()?.HttpMethods.Single()); 424var httpMethodMetadata = Assert.IsAssignableFrom<IHttpMethodMetadata>(metadata);
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (43)
80var metadataArray = endpoint.Metadata.OfType<IHttpMethodMetadata>().ToArray(); 82static string GetMethod(IHttpMethodMetadata metadata) => Assert.Single(metadata.HttpMethods); 89Assert.Equal("BUILDER", endpoint.Metadata.GetMetadata<IHttpMethodMetadata>()!.HttpMethods.Single()); 102var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 122var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 148var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 186var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 270var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 290var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 310var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 334var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 354var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 374var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 398var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 418var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 438var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 472var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 493var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 523var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 564var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 668var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 706var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>(); 726var methodMetadata = endpoint.Metadata.GetMetadata<IHttpMethodMetadata>();