81 references to GetOrderedMetadata
Microsoft.AspNetCore.Authorization.Policy (3)
AuthorizationMiddleware.cs (3)
116var authorizeData = endpoint?.Metadata.GetOrderedMetadata<IAuthorizeData>() ?? Array.Empty<IAuthorizeData>(); 118var policies = endpoint?.Metadata.GetOrderedMetadata<AuthorizationPolicy>() ?? Array.Empty<AuthorizationPolicy>(); 122var requirementData = endpoint?.Metadata?.GetOrderedMetadata<IAuthorizationRequirementData>() ?? Array.Empty<IAuthorizationRequirementData>();
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
RazorComponentEndpointFactoryTest.cs (1)
47var methods = Assert.Single(endpoint.Metadata.GetOrderedMetadata<HttpMethodMetadata>());
Microsoft.AspNetCore.Http (1)
Features\FormFeature.cs (1)
395.GetOrderedMetadata<IFormOptionsMetadata>();
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
EndpointMetadataCollectionTests.cs (3)
52var ordered = metadata.GetOrderedMetadata<string>(); 64var ordered1 = metadata.GetOrderedMetadata<string>(); 65var ordered2 = metadata.GetOrderedMetadata<string>();
Microsoft.AspNetCore.Http.Connections.Tests (20)
MapConnectionHandlerTests.cs (20)
51Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 52var policies = endpoint.Metadata.GetOrderedMetadata<AuthorizationPolicy>(); 61Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 62var policies = endpoint.Metadata.GetOrderedMetadata<AuthorizationPolicy>(); 88Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 93Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 115Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 120Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 143Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 148Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 174Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 179Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 203Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 208Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 233Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 238Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 265Assert.Collection(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>(), 275Assert.Collection(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>(), 421Assert.Empty(endpoint.Metadata.GetOrderedMetadata<DisableRequestTimeoutAttribute>()); 426Assert.Single(endpoint.Metadata.GetOrderedMetadata<DisableRequestTimeoutAttribute>());
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
EndpointMetadataApiDescriptionProvider.cs (3)
116var parameters = routeEndpoint.Metadata.GetOrderedMetadata<IParameterBindingMetadata>(); 329var responseProviderMetadata = endpointMetadata.GetOrderedMetadata<IApiResponseMetadataProvider>(); 330var producesResponseMetadata = endpointMetadata.GetOrderedMetadata<IProducesResponseTypeMetadata>();
Microsoft.AspNetCore.Mvc.Core (1)
Authorization\AuthorizeFilter.cs (1)
146var endpointAuthorizeData = endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>() ?? Array.Empty<IAuthorizeData>();
Microsoft.AspNetCore.Mvc.Core.Test (12)
Routing\ControllerActionEndpointDataSourceTest.cs (12)
347Assert.Equal(new[] { "Hi there", "A" }, e.Metadata.GetOrderedMetadata<string>()); 353Assert.Equal(new[] { "Hi there", "B" }, e.Metadata.GetOrderedMetadata<string>()); 362Assert.Equal(new[] { "Hi there", "A" }, e.Metadata.GetOrderedMetadata<string>()); 368Assert.Equal(new[] { "Hi there", "B" }, e.Metadata.GetOrderedMetadata<string>()); 441Assert.Equal(new[] { "group", "Hi there", "A" }, e.Metadata.GetOrderedMetadata<string>()); 448Assert.Equal(new[] { "group", "Hi there", "B" }, e.Metadata.GetOrderedMetadata<string>()); 459Assert.Equal(new[] { "group", "Hi there", "A" }, e.Metadata.GetOrderedMetadata<string>()); 466Assert.Equal(new[] { "group", "Hi there", "B" }, e.Metadata.GetOrderedMetadata<string>()); 474Assert.Equal(new[] { "group", "A", "Hi there" }, e.Metadata.GetOrderedMetadata<string>()); 530Assert.Equal(new[] { "A1", "A2", "C1", "C2" }, e.Metadata.GetOrderedMetadata<string>()); 535Assert.Equal(new[] { "B1", "B2", "C1", "C2" }, e.Metadata.GetOrderedMetadata<string>()); 540Assert.Equal(new[] { "C1", "C2" }, e.Metadata.GetOrderedMetadata<string>());
Microsoft.AspNetCore.Mvc.RazorPages.Test (4)
Infrastructure\PageActionEndpointDataSourceTest.cs (4)
159Assert.Equal(new[] { "group", "A", "Hi there" }, e.Metadata.GetOrderedMetadata<string>()); 166Assert.Equal(new[] { "group", "B", "Hi there" }, e.Metadata.GetOrderedMetadata<string>()); 209Assert.Equal(new[] { "A1", "A2" }, e.Metadata.GetOrderedMetadata<string>()); 257Assert.Equal(new[] { "initial-metadata", "initial-metadata-observed" }, e.Metadata.GetOrderedMetadata<string>());
Microsoft.AspNetCore.OpenApi (3)
Services\OpenApiGenerator.cs (3)
115var responseProviderMetadata = metadata.GetOrderedMetadata<IApiResponseMetadataProvider>(); 116var producesResponseMetadata = metadata.GetOrderedMetadata<IProducesResponseTypeMetadata>(); 327var metadataList = metadata.GetOrderedMetadata<ITagsMetadata>();
Microsoft.AspNetCore.Routing.Microbenchmarks (5)
EndpointMetadataCollectionBenchmark.cs (5)
86foreach (var item in _collection.GetOrderedMetadata<IMetadata1>()) 91foreach (var item in _collection.GetOrderedMetadata<IMetadata2>()) 96foreach (var item in _collection.GetOrderedMetadata<IMetadata3>()) 101foreach (var item in _collection.GetOrderedMetadata<IMetadata4>()) 106foreach (var item in _collection.GetOrderedMetadata<IMetadata5>())
Microsoft.AspNetCore.Routing.Tests (8)
Builder\GroupTest.cs (1)
331Assert.Equal(new[] { "/outer", "/inner", "/foo" }, endpoint.Metadata.GetOrderedMetadata<string>());
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (2)
449Assert.Single(endpoint.Metadata.GetOrderedMetadata<IEndpointNameMetadata>()); 467Assert.Single(endpoint.Metadata.GetOrderedMetadata<IEndpointNameMetadata>());
Builder\RouteHandlerEndpointRouteBuilderExtensionsTest.cs (2)
465var endpointNameMetadata = Assert.Single(endpoint.Metadata.GetOrderedMetadata<IEndpointNameMetadata>()); 466var routeNameMetadata = Assert.Single(endpoint.Metadata.GetOrderedMetadata<IRouteNameMetadata>());
CompositeEndpointDataSourceTest.cs (2)
482Assert.Equal(new[] { "initial-metadata", "saw-last-metadata" }, endpoint.Metadata.GetOrderedMetadata<string>()); 489Assert.Equal(new[] { "initial-metadata", "saw-last-metadata" }, endpoint.Metadata.GetOrderedMetadata<string>());
RouteEndpointBuilderTest.cs (1)
114Assert.Collection(endpoint.Metadata.GetOrderedMetadata<HttpMethodMetadata>(),
Microsoft.AspNetCore.SignalR.Tests (16)
MapSignalRTests.cs (16)
90Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 95Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 123Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 124var policies = endpoint.Metadata.GetOrderedMetadata<AuthorizationPolicy>(); 133Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 134var policies = endpoint.Metadata.GetOrderedMetadata<AuthorizationPolicy>(); 162Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 167Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 191Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 196Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 220Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 225Assert.Single(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>()); 252Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 257Assert.Equal(2, endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>().Count); 284Assert.Collection(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>(), 294Assert.Collection(endpoint.Metadata.GetOrderedMetadata<IAuthorizeData>(),
Mvc.RoutingWebSite (1)
Controllers\ConventionalControllerWithMetadata.cs (1)
14return Ok(HttpContext.GetEndpoint().Metadata.GetOrderedMetadata<MetadataAttribute>().Select(m => m.Value));