169 instantiations of EndpointMetadataCollection
DeveloperExceptionPageSample (1)
Startup.cs (1)
29new EndpointMetadataCollection(
Microsoft.AspNetCore.Antiforgery.Test (2)
AntiforgeryMiddlewareTest.cs (2)
80? new EndpointMetadataCollection(new AntiforgeryMetadata(!hasIgnoreMetadata)) 81: new EndpointMetadataCollection();
Microsoft.AspNetCore.Authorization.Test (2)
AuthorizationAppBuilderExtensionsTests.cs (1)
29new EndpointMetadataCollection(new AuthorizeAttribute()),
AuthorizationMiddlewareTests.cs (1)
1003return new Endpoint(context => Task.CompletedTask, new EndpointMetadataCollection(metadata), "Test endpoint");
Microsoft.AspNetCore.Components.Endpoints.Tests (5)
ImportMapTest.cs (3)
106context.SetEndpoint(new Endpoint((ctx) => Task.CompletedTask, new EndpointMetadataCollection(importMapDefinition), "Test")); 160context.SetEndpoint(new Endpoint((ctx) => Task.CompletedTask, new EndpointMetadataCollection(importMapDefinition), "Test")); 216context.SetEndpoint(new Endpoint((ctx) => Task.CompletedTask, new EndpointMetadataCollection(importMapDefinition), "Test"));
RazorComponentEndpointInvokerTest.cs (1)
38new EndpointMetadataCollection(
SSRRenderModeBoundaryTest.cs (1)
20httpContext.SetEndpoint(new Endpoint(null, new EndpointMetadataCollection(), null));
Microsoft.AspNetCore.Cors.Test (11)
CorsEndpointConventionBuilderExtensionsTests.cs (1)
92return new Endpoint(RequestDelegate, new EndpointMetadataCollection(Metadata), DisplayName);
CorsMiddlewareTests.cs (10)
729httpContext.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(new EnableCorsAttribute("MetadataPolicyName")), "Test endpoint")); 756httpContext.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(new EnableCorsAttribute(), new DisableCorsAttribute()), "Test endpoint")); 788httpContext.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(new EnableCorsAttribute(), new DisableCorsAttribute()), "Test endpoint")); 821httpContext.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(new EnableCorsAttribute("MetadataPolicyName")), "Test endpoint")); 856httpContext.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(new CorsPolicyMetadata(metadataPolicy)), "Test endpoint")); 893httpContext.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(new EnableCorsAttribute()), "Test endpoint")); 926httpContext.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(new DisableCorsAttribute()), "Test endpoint")); 956httpContext.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(new EnableCorsAttribute("MetadataPolicyName"), new DisableCorsAttribute()), "Test endpoint")); 983httpContext.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(new EnableCorsAttribute("MetadataPolicyName"), new DisableCorsAttribute()), "Test endpoint")); 1008httpContext.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(new EnableCorsAttribute("MetadataPolicyName"), new DisableCorsAttribute()), "Test endpoint"));
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (12)
Logging\HttpUtilityExtensionsTests.cs (2)
44new EndpointMetadataCollection(metadata), 73new EndpointMetadataCollection(metadata),
Logging\IncomingHttpRouteUtilityTests.cs (10)
48new EndpointMetadataCollection(metadata), 86new EndpointMetadataCollection(metadata), 126new EndpointMetadataCollection(metadata), 168new EndpointMetadataCollection(metadata), 210new EndpointMetadataCollection(metadata), 257new EndpointMetadataCollection(metadata), 298new EndpointMetadataCollection(metadata), 346new EndpointMetadataCollection(metadata), 391new EndpointMetadataCollection(metadata), 429new EndpointMetadataCollection(metadata),
Microsoft.AspNetCore.Diagnostics.Tests (5)
DeveloperExceptionPageMiddlewareTest.cs (1)
316var endpoint = new Endpoint(null, new EndpointMetadataCollection("my metadata"), null);
ExceptionHandlerMiddlewareTest.cs (2)
85httpContext.SetEndpoint(new Endpoint((_) => Task.CompletedTask, new EndpointMetadataCollection(), "Test")); 106var endpoint = new Endpoint((_) => Task.CompletedTask, new EndpointMetadataCollection(), "Test");
StatusCodeMiddlewareTest.cs (2)
157httpContext.SetEndpoint(new Endpoint((_) => Task.CompletedTask, new EndpointMetadataCollection(), "Test")); 199var endpoint = new Endpoint((_) => Task.CompletedTask, new EndpointMetadataCollection(), "Test");
Microsoft.AspNetCore.Hosting.Tests (2)
HostingApplicationDiagnosticsTests.cs (2)
319new EndpointMetadataCollection(new TestRouteDiagnosticsMetadata()), 379new EndpointMetadataCollection(new TestRouteDiagnosticsMetadata(), new DisableHttpMetricsAttribute()),
Microsoft.AspNetCore.Http.Abstractions (1)
Routing\EndpointMetadataCollection.cs (1)
27public static readonly EndpointMetadataCollection Empty = new EndpointMetadataCollection(Array.Empty<object>());
Microsoft.AspNetCore.Http.Abstractions.Tests (6)
EndpointMetadataCollectionTests.cs (6)
14var metadata = new EndpointMetadataCollection(new List<object> 34var metadata = new EndpointMetadataCollection(1, 2, 3); 49var metadata = new EndpointMetadataCollection(1, 2, 3); 61var metadata = new EndpointMetadataCollection("1", "2"); 75var metadata = new EndpointMetadataCollection(1, "2"); 87var metadata = new EndpointMetadataCollection(1, 2);
Microsoft.AspNetCore.Http.Extensions.Tests (2)
ProblemDetailsServiceTest.cs (2)
22var metadata = new EndpointMetadataCollection(new SampleMetadata() { ContentType = "application/problem+json" }); 48var metadata = new EndpointMetadataCollection(new SampleMetadata() { ContentType = "application/problem+json" });
Microsoft.AspNetCore.Http.Microbenchmarks (3)
RequestTimeoutsMiddlewareBenchmark.cs (3)
79new EndpointMetadataCollection(new DisableRequestTimeoutAttribute()), 90new EndpointMetadataCollection(new RequestTimeoutAttribute(200)), 101new EndpointMetadataCollection(new RequestTimeoutAttribute("policy1")),
Microsoft.AspNetCore.Http.Tests (1)
Timeouts\RequestTimeoutsMiddlewareTests.cs (1)
343return new Endpoint(null, new EndpointMetadataCollection(metadata), "endpoint");
Microsoft.AspNetCore.HttpLogging.Tests (1)
HttpLoggingEndpointConventionBuilderTests.cs (1)
58return new Endpoint(RequestDelegate, new EndpointMetadataCollection(Metadata), DisplayName);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
EndpointMetadataApiDescriptionProviderTest.cs (1)
1552var endpointMetadata = new EndpointMetadataCollection([.. metadataItems, .. attributes]);
Microsoft.AspNetCore.Mvc.Core (1)
Routing\ActionEndpointFactory.cs (1)
551return new Endpoint(RequestDelegate, new EndpointMetadataCollection(Metadata), DisplayName);
Microsoft.AspNetCore.Mvc.Core.Test (13)
Authorization\AuthorizeFilterTest.cs (1)
558new EndpointMetadataCollection(new AuthorizeAttribute("policy2")),
Infrastructure\ActionSelectionTableTest.cs (1)
559metadata: new EndpointMetadataCollection(metadata),
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (3)
142var context = CreateContext(stream, metadata: new EndpointMetadataCollection(new ControllerAttribute())); 157var context = CreateContext(stream, metadata: new EndpointMetadataCollection(new ControllerAttribute())); 203metadata ??= new EndpointMetadataCollection(new ApiControllerAttribute(), new ControllerAttribute());
Routing\ControllerLinkGeneratorExtensionsTest.cs (1)
203new EndpointMetadataCollection(metadata ?? Array.Empty<object>()),
Routing\DynamicControllerEndpointMatcherPolicyTest.cs (5)
48new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(actions[0]), "Test1"), 49new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(actions[1]), "Test2"), 50new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(actions[2]), "Test3"), 55new EndpointMetadataCollection(new object[] 356new Endpoint((ctx) => Task.CompletedTask, new EndpointMetadataCollection(Array.Empty<object>()), "ReplacedEndpoint")
Routing\EndpointRoutingUrlHelperTest.cs (1)
273new EndpointMetadataCollection(metadata),
Routing\PageLinkGeneratorExtensionsTest.cs (1)
173new EndpointMetadataCollection(metadata ?? Array.Empty<object>()),
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
PageLoaderMatcherPolicyTest.cs (1)
92new EndpointMetadataCollection(metadata),
Microsoft.AspNetCore.Mvc.Razor.Test (1)
TagHelpers\UrlResolutionTagHelperTest.cs (1)
409new EndpointMetadataCollection(
Microsoft.AspNetCore.Mvc.RazorPages.Test (6)
Infrastructure\DefaultPageLoaderTest.cs (2)
347var result1 = await loader.LoadAsync(pageDescriptor, new EndpointMetadataCollection()); 348var result2 = await loader.LoadAsync(pageDescriptor, new EndpointMetadataCollection());
Infrastructure\DynamicPageEndpointMatcherPolicyTest.cs (4)
40new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(actions[0]), "Test1"), 41new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(actions[1]), "Test2"), 46new EndpointMetadataCollection(new object[] 358new Endpoint((ctx) => Task.CompletedTask, new EndpointMetadataCollection(new PageActionDescriptor()
Microsoft.AspNetCore.Mvc.TagHelpers.Test (3)
ImageTagHelperTest.cs (1)
220new EndpointMetadataCollection(
LinkTagHelperTest.cs (1)
1195new EndpointMetadataCollection(
ScriptTagHelperTest.cs (1)
801new EndpointMetadataCollection(
Microsoft.AspNetCore.Mvc.Test (1)
Routing\ActionConstraintMatcherPolicyTest.cs (1)
481new EndpointMetadataCollection(metadata),
Microsoft.AspNetCore.OpenApi (1)
Extensions\OpenApiEndpointConventionBuilderExtensions.cs (1)
97var metadata = new EndpointMetadataCollection(routeEndpointBuilder.Metadata);
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiGeneratorTests.cs (1)
1008var endpointMetadata = new EndpointMetadataCollection(metadataItems.ToArray());
Microsoft.AspNetCore.RateLimiting.Tests (5)
RateLimitingMiddlewareTests.cs (4)
497var endpoint1 = new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(new EnableRateLimitingAttribute(endpointName1)), "Test endpoint 1"); 498var endpoint2 = new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(new EnableRateLimitingAttribute(endpointName2)), "Test endpoint 2"); 537context.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(new EnableRateLimitingAttribute(name), new DisableRateLimitingAttribute()), "Test endpoint")); 545context.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(new DisableRateLimitingAttribute(), new EnableRateLimitingAttribute(name)), "Test endpoint"));
TestEndpointBuilder.cs (1)
18return new Endpoint(RequestDelegate, new EndpointMetadataCollection(Metadata), DisplayName);
Microsoft.AspNetCore.RequestDecompression.Microbenchmarks (2)
RequestDecompressionMiddlewareBenchmark.cs (2)
78? new EndpointMetadataCollection(new SizeLimitMetadata()) 79: new EndpointMetadataCollection();
Microsoft.AspNetCore.RequestDecompression.Tests (1)
RequestDecompressionMiddlewareTests.cs (1)
754new EndpointMetadataCollection(new[] { requestSizeLimitMetadata });
Microsoft.AspNetCore.Routing (1)
RouteEndpointBuilder.cs (1)
114return new EndpointMetadataCollection(metadata);
Microsoft.AspNetCore.Routing.Microbenchmarks (3)
EndpointMetadataCollectionBenchmark.cs (1)
39_collection = new EndpointMetadataCollection(_items);
EndpointRoutingBenchmarkBase.cs (1)
122new EndpointMetadataCollection(endpointMetadata),
EndpointRoutingShortCircuitBenchmark.cs (1)
27var normalEndpoint = new Endpoint(context => Task.CompletedTask, new EndpointMetadataCollection(), "normal");
Microsoft.AspNetCore.Routing.Tests (66)
CompositeEndpointDataSourceTest.cs (2)
319var endpointMetadata = new EndpointMetadataCollection(new object[] 430var endpointMetadata = new EndpointMetadataCollection(new object[]
EndpointFactory.cs (1)
35new EndpointMetadataCollection(metadata ?? Array.Empty<object>()),
EndpointMiddlewareTest.cs (7)
113httpContext.SetEndpoint(new Endpoint(throwIfCalled, new EndpointMetadataCollection(Mock.Of<IAuthorizeData>()), "Test")); 142httpContext.SetEndpoint(new Endpoint(requestDelegate: null, new EndpointMetadataCollection(Mock.Of<IAuthorizeData>()), "Test")); 169httpContext.SetEndpoint(new Endpoint(endpointFunc, new EndpointMetadataCollection(Mock.Of<IAuthorizeData>()), "Test")); 203httpContext.SetEndpoint(new Endpoint(endpointFunc, new EndpointMetadataCollection(Mock.Of<IAuthorizeData>()), "Test")); 239httpContext.SetEndpoint(new Endpoint(throwIfCalled, new EndpointMetadataCollection(Mock.Of<ICorsMetadata>()), "Test")); 266httpContext.SetEndpoint(new Endpoint(endpointFunc, new EndpointMetadataCollection(Mock.Of<ICorsMetadata>()), "Test")); 300httpContext.SetEndpoint(new Endpoint(endpointFunc, new EndpointMetadataCollection(Mock.Of<IAuthorizeData>()), "Test"));
EndpointRoutingMiddlewareTest.cs (6)
45httpContext.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(), "myapp")); 250c.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(metadata), "myapp")); 286c.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(metadata), "myapp")); 315c.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(metadata), "myapp")); 343c.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(), "myapp")); 374c.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(metadata), "myapp"));
Internal\DfaGraphWriterTest.cs (2)
49new EndpointMetadataCollection(new SuppressMatchingMetadata()), 72new EndpointMetadataCollection(new HttpMethodMetadata(new[] { "GET" })),
MatcherPolicyTest.cs (1)
66new EndpointMetadataCollection(metadata),
Matching\AcceptsMatcherPolicyTest.cs (1)
615new EndpointMetadataCollection(metadata),
Matching\ContentEncodingNegotiationMatcherPolicyTest.cs (19)
25new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Endpoint -> No Content Encoding"), 42new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Endpoint -> No Content Encoding"), 43new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Endpoint -> No Content Encoding"), 61new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(new DynamicMetadata()), "Endpoint -> Dynamic Endpoint Metadata"), 78new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Endpoint -> No Content Encoding")); 98new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Endpoint -> No Content Encoding")); 117new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Endpoint -> No Content Encoding"), 218new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Endpoint -> No Content Encoding")); 295new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Identity"), 314new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Identity"), 333new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Identity"), 386new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Identity"), 446new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Endpoint -> No Content Encoding")); 465new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Endpoint -> No Content Encoding")); 482new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Endpoint -> No Content Encoding"), 572new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Identity"), 590new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Identity"), 608new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(), "Identity"), 638new EndpointMetadataCollection(new ContentEncodingMetadata(contentEncoding, quality)),
Matching\DataSourceDependentMatcherTest.cs (9)
106new EndpointMetadataCollection(new SuppressMatchingMetadata()), 128new EndpointMetadataCollection(new SuppressMatchingMetadata(), new EncourageMatchingMetadata()), 151new EndpointMetadataCollection(new EndpointNameMetadata("Foo")), 158new EndpointMetadataCollection(new EndpointNameMetadata("Foo")), 179new EndpointMetadataCollection(new EndpointNameMetadata("Foo")), 186new EndpointMetadataCollection(new EndpointNameMetadata("Bar")), 194new EndpointMetadataCollection(new EndpointNameMetadata("Foo")), 217new EndpointMetadataCollection(new EndpointNameMetadata("Foo")), 230new EndpointMetadataCollection(new EndpointNameMetadata("Foo")),
Matching\EndpointComparerTest.cs (1)
248new EndpointMetadataCollection(metadata),
Matching\EndpointMetadataComparerTest.cs (10)
14var endpoint1 = new Endpoint(TestConstants.EmptyRequestDelegate, new EndpointMetadataCollection(new object[] { new TestMetadata(), }), "test1"); 15var endpoint2 = new Endpoint(TestConstants.EmptyRequestDelegate, new EndpointMetadataCollection(new object[] { }), "test2"); 28var endpoint1 = new Endpoint(TestConstants.EmptyRequestDelegate, new EndpointMetadataCollection(new object[] { }), "test1"); 29var endpoint2 = new Endpoint(TestConstants.EmptyRequestDelegate, new EndpointMetadataCollection(new object[] { new TestMetadata(), }), "test2"); 42var endpoint1 = new Endpoint(TestConstants.EmptyRequestDelegate, new EndpointMetadataCollection(new object[] { new TestMetadata(), }), "test1"); 43var endpoint2 = new Endpoint(TestConstants.EmptyRequestDelegate, new EndpointMetadataCollection(new object[] { new TestMetadata(), }), "test2"); 56var endpoint1 = new Endpoint(TestConstants.EmptyRequestDelegate, new EndpointMetadataCollection(new object[] { }), "test1"); 57var endpoint2 = new Endpoint(TestConstants.EmptyRequestDelegate, new EndpointMetadataCollection(new object[] { }), "test2"); 70var endpoint1 = new Endpoint(TestConstants.EmptyRequestDelegate, new EndpointMetadataCollection(new object[] { new TestMetadata(), }), "test1"); 71var endpoint2 = new Endpoint(TestConstants.EmptyRequestDelegate, new EndpointMetadataCollection(new object[] { }), "test2");
Matching\HostMatcherPolicyIntegrationTestBase.cs (1)
423new EndpointMetadataCollection(metadata),
Matching\HostMatcherPolicyTest.cs (1)
275new EndpointMetadataCollection(metadata),
Matching\HttpMethodMatcherPolicyIntegrationTestBase.cs (1)
405new EndpointMetadataCollection(metadata),
Matching\HttpMethodMatcherPolicyTest.cs (1)
405new EndpointMetadataCollection(metadata),
RouteValuesAddressSchemeTest.cs (2)
389metadataCollection: new EndpointMetadataCollection(new[] { new SuppressLinkGenerationMetadata() })); 440metadataCollection = new EndpointMetadataCollection(metadata);
TestObjects\TestMatcherFactory.cs (1)
78var metadata = new EndpointMetadataCollection(metadataList);
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
StaticFileMiddlewareTests.cs (1)
67new EndpointMetadataCollection(),
Microsoft.AspNetCore.StaticFiles.Tests (6)
DefaultFilesMiddlewareTests.cs (2)
97new EndpointMetadataCollection(), 137new EndpointMetadataCollection(),
DirectoryBrowserMiddlewareTests.cs (2)
115new EndpointMetadataCollection(), 152new EndpointMetadataCollection(),
StaticFileMiddlewareTests.cs (2)
347ctx.SetEndpoint(new Endpoint(requestDelegate: null, new EndpointMetadataCollection(), "NullRequestDelegateEndpoint")); 395ctx.SetEndpoint(new Endpoint(handler, new EndpointMetadataCollection(), "RequestDelegateEndpoint"));
StaticFilesAuth (1)
Startup.cs (1)
134new EndpointMetadataCollection(metadata),
115 references to EndpointMetadataCollection
Benchmarks (1)
StartupUsingEndpointRouting.cs (1)
38metadata: EndpointMetadataCollection.Empty,
Microsoft.AspNetCore.Cors.Test (1)
CorsMiddlewareTests.cs (1)
699httpContext.SetEndpoint(new Endpoint(c => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test endpoint"));
Microsoft.AspNetCore.Diagnostics (1)
DeveloperExceptionPage\Views\EndpointModel.cs (1)
14public EndpointMetadataCollection? Metadata { get; set; }
Microsoft.AspNetCore.Http.Abstractions (14)
ProblemDetails\ProblemDetailsContext.cs (1)
23public EndpointMetadataCollection? AdditionalMetadata { get; init; }
Routing\Endpoint.cs (4)
19/// The endpoint <see cref="EndpointMetadataCollection"/>. May be null. 26EndpointMetadataCollection? metadata, 31Metadata = metadata ?? EndpointMetadataCollection.Empty; 43public EndpointMetadataCollection Metadata { get; }
Routing\EndpointMetadataCollection.cs (9)
16/// <see cref="EndpointMetadataCollection"/> instances contain a list of metadata items 25/// An empty <see cref="EndpointMetadataCollection"/>. 27public static readonly EndpointMetadataCollection Empty = new EndpointMetadataCollection(Array.Empty<object>()); 33/// Creates a new <see cref="EndpointMetadataCollection"/>. 45/// Creates a new <see cref="EndpointMetadataCollection"/>. 163/// Enumerates the elements of an <see cref="EndpointMetadataCollection"/>. 174internal Enumerator(EndpointMetadataCollection collection) 224private readonly EndpointMetadataCollection _collection; 226public EndpointMetadataCollectionDebugView(EndpointMetadataCollection collection)
Microsoft.AspNetCore.Http.Abstractions.Tests (12)
EndpointHttpContextExtensionsTests.cs (6)
45var initial = new Endpoint(c => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test endpoint"); 78var endpoint = new Endpoint(c => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test endpoint"); 92var initialEndpoint = new Endpoint(c => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test endpoint"); 100var endpoint = new Endpoint(c => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test endpoint"); 114var initialEndpoint = new Endpoint(c => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test endpoint"); 135var initialEndpoint = new Endpoint(c => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test endpoint");
EndpointMetadataCollectionTests.cs (6)
14var metadata = new EndpointMetadataCollection(new List<object> 34var metadata = new EndpointMetadataCollection(1, 2, 3); 49var metadata = new EndpointMetadataCollection(1, 2, 3); 61var metadata = new EndpointMetadataCollection("1", "2"); 75var metadata = new EndpointMetadataCollection(1, "2"); 87var metadata = new EndpointMetadataCollection(1, 2);
Microsoft.AspNetCore.Http.Extensions.Tests (2)
ProblemDetailsServiceTest.cs (2)
22var metadata = new EndpointMetadataCollection(new SampleMetadata() { ContentType = "application/problem+json" }); 48var metadata = new EndpointMetadataCollection(new SampleMetadata() { ContentType = "application/problem+json" });
Microsoft.AspNetCore.Http.Tests (2)
ApplicationBuilderTests.cs (2)
63EndpointMetadataCollection.Empty, 145EndpointMetadataCollection.Empty,
Microsoft.AspNetCore.Mvc.ApiExplorer (2)
EndpointMetadataApiDescriptionProvider.cs (2)
323EndpointMetadataCollection endpointMetadata) 465EndpointMetadataCollection endpointMetadata)
Microsoft.AspNetCore.Mvc.Core.Test (3)
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (2)
127var context = CreateContext(stream, metadata: EndpointMetadataCollection.Empty); 201private static HttpContext CreateContext(Stream body, int statusCode = StatusCodes.Status400BadRequest, EndpointMetadataCollection metadata = null)
Routing\EndpointRoutingUrlHelperTest.cs (1)
141httpContext.SetEndpoint(new Endpoint(context => Task.CompletedTask, EndpointMetadataCollection.Empty, null));
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (3)
PageLoaderMatcherPolicyTest.cs (3)
24var loader = Mock.Of<PageLoader>(p => p.LoadAsync(It.IsAny<PageActionDescriptor>(), It.IsAny<EndpointMetadataCollection>()) == Task.FromResult(compiled)); 43loader.Setup(l => l.LoadAsync(It.IsAny<PageActionDescriptor>(), It.IsAny<EndpointMetadataCollection>())) 75var loader = Mock.Of<PageLoader>(p => p.LoadAsync(It.IsAny<PageActionDescriptor>(), It.IsAny<EndpointMetadataCollection>()) == loadTask);
Microsoft.AspNetCore.Mvc.RazorPages (8)
Infrastructure\DefaultPageLoader.cs (3)
36=> LoadAsync(actionDescriptor, EndpointMetadataCollection.Empty); 38public override Task<CompiledPageActionDescriptor> LoadAsync(PageActionDescriptor actionDescriptor, EndpointMetadataCollection endpointMetadata) 60private async Task<CompiledPageActionDescriptor> LoadAsyncCore(PageActionDescriptor actionDescriptor, EndpointMetadataCollection endpointMetadata)
Infrastructure\DynamicPageEndpointMatcherPolicy.cs (1)
159var metadata = loadedEndpoints[j].Metadata;
Infrastructure\PageActionInvokerProvider.cs (1)
76page.CompiledPageDescriptor = _pageLoader.LoadAsync(page, EndpointMetadataCollection.Empty).GetAwaiter().GetResult();
Infrastructure\PageLoader.cs (3)
27/// <param name="endpointMetadata">The <see cref="EndpointMetadataCollection"/>.</param> 29public virtual Task<CompiledPageActionDescriptor> LoadAsync(PageActionDescriptor actionDescriptor, EndpointMetadataCollection endpointMetadata) 33=> LoadAsync(actionDescriptor, EndpointMetadataCollection.Empty).GetAwaiter().GetResult();
Microsoft.AspNetCore.Mvc.RazorPages.Test (17)
Infrastructure\DefaultPageLoaderTest.cs (7)
94var result = await loader.LoadAsync(new PageActionDescriptor(), EndpointMetadataCollection.Empty); 148var result = await loader.LoadAsync(descriptor, EndpointMetadataCollection.Empty); 211var result = await loader.LoadAsync(new PageActionDescriptor(), EndpointMetadataCollection.Empty); 265var result1 = await loader.LoadAsync(descriptor, EndpointMetadataCollection.Empty); 266var result2 = await loader.LoadAsync(descriptor, EndpointMetadataCollection.Empty); 325var result1 = await loader.LoadAsync(descriptor, EndpointMetadataCollection.Empty); 326var result2 = await loader.LoadAsync(descriptor2, EndpointMetadataCollection.Empty);
Infrastructure\DynamicPageEndpointMatcherPolicyTest.cs (5)
72new Endpoint(_ => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test1"), 73new Endpoint(_ => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test2"), 74new Endpoint(_ => Task.CompletedTask, EndpointMetadataCollection.Empty, "ReplacedLoaded") 79.Setup(l => l.LoadAsync(It.IsAny<PageActionDescriptor>(), It.IsAny<EndpointMetadataCollection>())) 80.Returns((PageActionDescriptor descriptor, EndpointMetadataCollection endpoint) => Task.FromResult(new CompiledPageActionDescriptor
Infrastructure\PageActionInvokerProviderTest.cs (5)
272loader.Verify(l => l.LoadAsync(It.IsAny<PageActionDescriptor>(), It.IsAny<EndpointMetadataCollection>()), Times.Never()); 286loader.Setup(l => l.LoadAsync(descriptor, EndpointMetadataCollection.Empty)) 306loader.Verify(l => l.LoadAsync(It.IsAny<PageActionDescriptor>(), It.IsAny<EndpointMetadataCollection>()), Times.Once()); 382.Setup(l => l.LoadAsync(It.IsAny<PageActionDescriptor>(), It.IsAny<EndpointMetadataCollection>())) 431.Setup(l => l.LoadAsync(It.IsAny<PageActionDescriptor>(), It.IsAny<EndpointMetadataCollection>()))
Microsoft.AspNetCore.OpenApi (7)
Extensions\OpenApiEndpointConventionBuilderExtensions.cs (1)
97var metadata = new EndpointMetadataCollection(routeEndpointBuilder.Metadata);
Services\OpenApiGenerator.cs (6)
54/// <param name="metadata">The endpoint <see cref="EndpointMetadataCollection"/>.</param> 59EndpointMetadataCollection metadata, 72private OpenApiOperation GetOperation(string httpMethod, MethodInfo methodInfo, EndpointMetadataCollection metadata, RoutePattern pattern) 98private static OpenApiResponses GetOpenApiResponses(MethodInfo method, EndpointMetadataCollection metadata) 255private OpenApiRequestBody? GetOpenApiRequestBody(MethodInfo methodInfo, EndpointMetadataCollection metadata, RoutePattern pattern, bool disableInferredBody) 325private List<OpenApiTag> GetOperationTags(MethodInfo methodInfo, EndpointMetadataCollection metadata)
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiGeneratorTests.cs (1)
1008var endpointMetadata = new EndpointMetadataCollection(metadataItems.ToArray());
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheMiddleware.cs (1)
226var metadata = httpContext.GetEndpoint()?.Metadata;
Microsoft.AspNetCore.RequestDecompression.Microbenchmarks (1)
RequestDecompressionMiddlewareBenchmark.cs (1)
77var metadataCollection = hasRequestSizeLimitMetadata
Microsoft.AspNetCore.RequestDecompression.Tests (1)
RequestDecompressionMiddlewareTests.cs (1)
753var endpointMetadata =
Microsoft.AspNetCore.Routing (6)
Matching\AcceptsMatcherPolicy.cs (1)
256EndpointMetadataCollection.Empty,
Matching\HttpMethodMatcherPolicy.cs (1)
392EndpointMetadataCollection.Empty,
Matching\NegotiationMatcherPolicy.cs (1)
326EndpointMetadataCollection.Empty,
RouteEndpoint.cs (2)
21/// The <see cref="EndpointMetadataCollection"/> or metadata associated with the endpoint. 28EndpointMetadataCollection? metadata,
RouteEndpointBuilder.cs (1)
63private static EndpointMetadataCollection CreateMetadataCollection(IList<object> metadata, RoutePattern routePattern)
Microsoft.AspNetCore.Routing.Abstractions (1)
Properties\AssemblyInfo.cs (1)
12[assembly: TypeForwardedTo(typeof(EndpointMetadataCollection))]
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
EndpointMetadataCollectionBenchmark.cs (1)
12private EndpointMetadataCollection _collection;
Microsoft.AspNetCore.Routing.Tests (29)
Builder\EndpointRoutingApplicationBuilderExtensionsTest.cs (1)
83EndpointMetadataCollection.Empty,
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (1)
486var metadata = endpoint.Metadata;
CompositeEndpointDataSourceTest.cs (4)
319var endpointMetadata = new EndpointMetadataCollection(new object[] 430var endpointMetadata = new EndpointMetadataCollection(new object[] 497EndpointMetadataCollection metadata = null, 504metadata ?? EndpointMetadataCollection.Empty,
DefaultEndpointDataSourceTests.cs (8)
15new Endpoint(TestConstants.EmptyRequestDelegate, EndpointMetadataCollection.Empty, "1"), 16new Endpoint(TestConstants.EmptyRequestDelegate, EndpointMetadataCollection.Empty, "2") 29var endpoint1 = new Endpoint(TestConstants.EmptyRequestDelegate, EndpointMetadataCollection.Empty, "1"); 30var endpoint2 = new Endpoint(TestConstants.EmptyRequestDelegate, EndpointMetadataCollection.Empty, "2"); 59new Endpoint(TestConstants.EmptyRequestDelegate, EndpointMetadataCollection.Empty, "1"), 60new Endpoint(TestConstants.EmptyRequestDelegate, EndpointMetadataCollection.Empty, "2") 73var endpoint1 = new Endpoint(TestConstants.EmptyRequestDelegate, EndpointMetadataCollection.Empty, "1"); 74var endpoint2 = new Endpoint(TestConstants.EmptyRequestDelegate, EndpointMetadataCollection.Empty, "2");
EndpointMiddlewareTest.cs (1)
79httpContext.SetEndpoint(new Endpoint(endpointFunc, EndpointMetadataCollection.Empty, "Test"));
Internal\DfaGraphWriterTest.cs (1)
27var endpointsDataSource = new DefaultEndpointDataSource(new Endpoint((context) => null, EndpointMetadataCollection.Empty, string.Empty));
Matching\DataSourceDependentMatcherTest.cs (3)
41EndpointMetadataCollection.Empty, 66EndpointMetadataCollection.Empty, 85var endpoint = new Endpoint(TestConstants.EmptyRequestDelegate, EndpointMetadataCollection.Empty, "test");
Matching\DefaultEndpointSelectorTest.cs (1)
181EndpointMetadataCollection.Empty,
Matching\DfaMatcherBuilderTest.cs (1)
3676var maxValueEndpoint = new Endpoint(TestConstants.EmptyRequestDelegate, EndpointMetadataCollection.Empty, "MaxValueEndpoint");
Matching\HttpMethodMatcherPolicyTest.cs (1)
172Assert.Equal(EndpointMetadataCollection.Empty, httpContext.GetEndpoint().Metadata);
Matching\MatcherConformanceTest.cs (1)
41EndpointMetadataCollection.Empty,
RouteOptionsTests.cs (2)
37var endpoint1 = new Endpoint((c) => Task.CompletedTask, EndpointMetadataCollection.Empty, string.Empty); 38var endpoint2 = new Endpoint((c) => Task.CompletedTask, EndpointMetadataCollection.Empty, string.Empty);
RouteValuesAddressSchemeTest.cs (1)
431EndpointMetadataCollection metadataCollection = null)
RoutingMetricsTests.cs (1)
93c.SetEndpoint(new Endpoint(c => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test name"));
TestObjects\TestMatcher.cs (1)
21c.SetEndpoint(new Endpoint(TestConstants.EmptyRequestDelegate, EndpointMetadataCollection.Empty, "Test endpoint"));
TestObjects\TestMatcherFactory.cs (1)
78var metadata = new EndpointMetadataCollection(metadataList);
Microsoft.AspNetCore.Security.Microbenchmarks (1)
AuthorizationMiddlewareBenchmark.cs (1)
28Endpoint = new Endpoint((context) => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test endpoint")