162 references to Endpoint
Microsoft.AspNetCore.Authorization.Test (2)
AuthorizationAppBuilderExtensionsTests.cs (1)
27var endpoint = new Endpoint(
AuthorizationMiddlewareTests.cs (1)
1003return new Endpoint(context => Task.CompletedTask, new EndpointMetadataCollection(metadata), "Test endpoint");
Microsoft.AspNetCore.Components.Endpoints.Tests (13)
EndpointHtmlRendererTest.cs (8)
1185var endpoint = new Endpoint((context) => Task.CompletedTask, new EndpointMetadataCollection(declaredRenderModesMetadata), 1206var endpoint = new Endpoint((context) => Task.CompletedTask, new EndpointMetadataCollection(declaredRenderModesMetadata), 1236var endpoint = new Endpoint((context) => Task.CompletedTask, new EndpointMetadataCollection(declaredRenderModesMetadata), 1264var endpoint = new Endpoint((context) => Task.CompletedTask, new EndpointMetadataCollection(declaredRenderModesMetadata), 1318var endpoint = new Endpoint((context) => Task.CompletedTask, new EndpointMetadataCollection(declaredRenderModesMetadata), 1356var endpoint = new Endpoint((context) => Task.CompletedTask, new EndpointMetadataCollection(declaredRenderModesMetadata), 1386var endpoint = new Endpoint((context) => Task.CompletedTask, new EndpointMetadataCollection(declaredRenderModesMetadata), 1451var endpoint = new Endpoint((context) => Task.CompletedTask, new EndpointMetadataCollection(declaredRenderModesMetadata),
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"));
SSRRenderModeBoundaryTest.cs (2)
20httpContext.SetEndpoint(new Endpoint(null, new EndpointMetadataCollection(), null)); 86httpContext.SetEndpoint(new Endpoint(null, new EndpointMetadataCollection(
Microsoft.AspNetCore.Cors.Test (12)
CorsEndpointConventionBuilderExtensionsTests.cs (1)
92return new Endpoint(RequestDelegate, new EndpointMetadataCollection(Metadata), DisplayName);
CorsMiddlewareTests.cs (11)
699httpContext.SetEndpoint(new Endpoint(c => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test endpoint")); 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.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)
317context.HttpContext.SetEndpoint(new Endpoint( 377context.HttpContext.SetEndpoint(new Endpoint(
Microsoft.AspNetCore.Http.Abstractions.Tests (6)
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");
Microsoft.AspNetCore.Http.Connections.Tests (1)
HttpConnectionDispatcherTests.cs (1)
781context.SetEndpoint(new Endpoint(null, null, "TestName"));
Microsoft.AspNetCore.Http.Microbenchmarks (6)
RequestTimeoutsMiddlewareBenchmark.cs (6)
62var context = CreateHttpContext(new Endpoint(null, null, null)); 69var context = CreateHttpContext(new Endpoint(null, null, null)); 77var context = CreateHttpContext(new Endpoint( 88var context = CreateHttpContext(new Endpoint( 99var context = CreateHttpContext(new Endpoint( 110var context = CreateHttpContext(new Endpoint(null, null, null));
Microsoft.AspNetCore.Http.Tests (3)
ApplicationBuilderTests.cs (2)
57var endpoint = new Endpoint( 139var endpoint = new Endpoint(
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.Core (1)
Routing\ActionEndpointFactory.cs (1)
551return new Endpoint(RequestDelegate, new EndpointMetadataCollection(Metadata), DisplayName);
Microsoft.AspNetCore.Mvc.Core.Test (9)
Authorization\AuthorizeFilterTest.cs (1)
556ActionContext.HttpContext.SetEndpoint(new Endpoint(
Infrastructure\ActionSelectionTableTest.cs (1)
557return new Endpoint(
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (1)
210context.SetEndpoint(new Endpoint(null, metadata, string.Empty));
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"), 53DynamicEndpoint = new Endpoint( 356new Endpoint((ctx) => Task.CompletedTask, new EndpointMetadataCollection(Array.Empty<object>()), "ReplacedEndpoint")
Routing\EndpointRoutingUrlHelperTest.cs (1)
141httpContext.SetEndpoint(new Endpoint(context => Task.CompletedTask, EndpointMetadataCollection.Empty, null));
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
PageLoaderMatcherPolicyTest.cs (1)
90return new Endpoint(
Microsoft.AspNetCore.Mvc.RazorPages.Test (7)
Infrastructure\DynamicPageEndpointMatcherPolicyTest.cs (7)
40new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(actions[0]), "Test1"), 41new Endpoint(_ => Task.CompletedTask, new EndpointMetadataCollection(actions[1]), "Test2"), 44DynamicEndpoint = new Endpoint( 72new Endpoint(_ => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test1"), 73new Endpoint(_ => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test2"), 74new Endpoint(_ => Task.CompletedTask, EndpointMetadataCollection.Empty, "ReplacedLoaded") 358new Endpoint((ctx) => Task.CompletedTask, new EndpointMetadataCollection(new PageActionDescriptor()
Microsoft.AspNetCore.Mvc.Test (1)
Routing\ActionConstraintMatcherPolicyTest.cs (1)
479return new Endpoint(
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 (1)
RequestDecompressionMiddlewareBenchmark.cs (1)
81Endpoint = new Endpoint(
Microsoft.AspNetCore.RequestDecompression.Tests (1)
RequestDecompressionMiddlewareTests.cs (1)
758Endpoint = new Endpoint(
Microsoft.AspNetCore.Routing (4)
Matching\AcceptsMatcherPolicy.cs (1)
251return Http415Endpoint ??= new Endpoint(context =>
Matching\HttpMethodMatcherPolicy.cs (1)
383return new Endpoint(
Matching\NegotiationMatcherPolicy.cs (1)
320Http406Endpoint ??= new Endpoint(
RouteEndpoint.cs (1)
30: base(requestDelegate, metadata, displayName)
Microsoft.AspNetCore.Routing.Microbenchmarks (2)
EndpointRoutingShortCircuitBenchmark.cs (2)
27var normalEndpoint = new Endpoint(context => Task.CompletedTask, new EndpointMetadataCollection(), "normal"); 39var shortCircuitEndpoint = new Endpoint(context => Task.CompletedTask, new EndpointMetadataCollection(new ShortCircuitMetadata(200)), "shortcircuit");
Microsoft.AspNetCore.Routing.Tests (70)
Builder\GroupTest.cs (1)
388public TestCustomEndpoint() : base(null, null, null) { }
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 (11)
79httpContext.SetEndpoint(new Endpoint(endpointFunc, EndpointMetadataCollection.Empty, "Test")); 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")); 337httpContext.SetEndpoint(new Endpoint(throwIfCalled, new EndpointMetadataCollection(AntiforgeryMetadata.ValidationRequired), "Test")); 364httpContext.SetEndpoint(new Endpoint(endpointFunc, new EndpointMetadataCollection(AntiforgeryMetadata.ValidationRequired), "Test")); 398httpContext.SetEndpoint(new Endpoint(endpointFunc, new EndpointMetadataCollection(AntiforgeryMetadata.ValidationRequired), "Test"));
EndpointRoutingMiddlewareFormOptionsTest.cs (7)
39c.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(formOptionsMetadata), "myapp")); 73c.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(formOptionsMetadata1, formOptionsMetadata2, formOptionsMetadata3), "myapp")); 111c.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(formOptionsMetadata), "myapp")); 139var endpoint = new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(endpointMetadata), "myapp"); 146c.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(formOptionsMetadata), "myapp")); 171var endpoint = new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(endpointMetadata), "myapp"); 178c.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(formOptionsMetadata), "myapp"));
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 (1)
27var endpointsDataSource = new DefaultEndpointDataSource(new Endpoint((context) => null, EndpointMetadataCollection.Empty, string.Empty));
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"), 636var endpoint = new Endpoint(
Matching\DataSourceDependentMatcherTest.cs (1)
85var endpoint = new Endpoint(TestConstants.EmptyRequestDelegate, EndpointMetadataCollection.Empty, "test");
Matching\DfaMatcherBuilderTest.cs (1)
3676var maxValueEndpoint = new Endpoint(TestConstants.EmptyRequestDelegate, EndpointMetadataCollection.Empty, "MaxValueEndpoint");
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");
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);
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)
79httpContext.SetEndpoint(new Endpoint(TestConstants.ShortCircuitRequestDelegate, metadata, "Short Circuit Endpoint"));
Microsoft.AspNetCore.Security.Microbenchmarks (1)
AuthorizationMiddlewareBenchmark.cs (1)
28Endpoint = new Endpoint((context) => Task.CompletedTask, EndpointMetadataCollection.Empty, "Test endpoint")
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
StaticFileMiddlewareTests.cs (1)
63context.SetEndpoint(new Endpoint((c) =>
Microsoft.AspNetCore.StaticFiles.Tests (6)
DefaultFilesMiddlewareTests.cs (2)
93context.SetEndpoint(new Endpoint((c) => 136context.SetEndpoint(new Endpoint(requestDelegate: null,
DirectoryBrowserMiddlewareTests.cs (2)
110context.SetEndpoint(new Endpoint((c) => 151context.SetEndpoint(new Endpoint(requestDelegate: null,
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)
132var endpoint = new Endpoint(