172 references to SetEndpoint
DeveloperExceptionPageSample (1)
Startup.cs (1)
34context.SetEndpoint(endpoint);
Microsoft.AspNetCore.Antiforgery (1)
src\Shared\HttpExtensions.cs (1)
58context.SetEndpoint(endpoint: null);
Microsoft.AspNetCore.Antiforgery.Test (1)
AntiforgeryMiddlewareTest.cs (1)
82httpContext.SetEndpoint(new Endpoint(null, metadata, "TestEndpoint"));
Microsoft.AspNetCore.Authorization.Test (2)
AuthorizationAppBuilderExtensionsTests.cs (1)
34httpContext.SetEndpoint(endpoint);
AuthorizationMiddlewareTests.cs (1)
1050httpContext.SetEndpoint(endpoint);
Microsoft.AspNetCore.Components.Endpoints.Tests (14)
EndpointHtmlRendererTest.cs (8)
1189httpContext.SetEndpoint(endpoint); 1210httpContext.SetEndpoint(endpoint); 1240httpContext.SetEndpoint(endpoint); 1268httpContext.SetEndpoint(endpoint); 1322httpContext.SetEndpoint(endpoint); 1360httpContext.SetEndpoint(endpoint); 1390httpContext.SetEndpoint(endpoint); 1455httpContext.SetEndpoint(endpoint);
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)
34context.SetEndpoint(new RouteEndpoint(
SSRRenderModeBoundaryTest.cs (2)
20httpContext.SetEndpoint(new Endpoint(null, new EndpointMetadataCollection(), null)); 86httpContext.SetEndpoint(new Endpoint(null, new EndpointMetadataCollection(
Microsoft.AspNetCore.Cors.Test (11)
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 (1)
src\Shared\HttpExtensions.cs (1)
58context.SetEndpoint(endpoint: null);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (12)
Logging\HttpUtilityExtensionsTests.cs (2)
50context.SetEndpoint(endpoint); 79context.SetEndpoint(endpoint);
Logging\IncomingHttpRouteUtilityTests.cs (10)
54context.SetEndpoint(endpoint); 92context.SetEndpoint(endpoint); 132context.SetEndpoint(endpoint); 174context.SetEndpoint(endpoint); 216context.SetEndpoint(endpoint); 263context.SetEndpoint(endpoint); 304context.SetEndpoint(endpoint); 352context.SetEndpoint(endpoint); 397context.SetEndpoint(endpoint); 435context.SetEndpoint(endpoint);
Microsoft.AspNetCore.Diagnostics.Tests (8)
DeveloperExceptionPageMiddlewareTest.cs (1)
317httpContext.SetEndpoint(endpoint);
ExceptionHandlerMiddlewareTest.cs (5)
85httpContext.SetEndpoint(new Endpoint((_) => Task.CompletedTask, new EndpointMetadataCollection(), "Test")); 107httpContext.SetEndpoint(endpoint); 326context.SetEndpoint(originalEndpoint); 387c.SetEndpoint(newEndpoint); 393context.SetEndpoint(originalEndpoint);
StatusCodeMiddlewareTest.cs (2)
157httpContext.SetEndpoint(new Endpoint((_) => Task.CompletedTask, new EndpointMetadataCollection(), "Test")); 213httpContext.SetEndpoint(endpoint);
Microsoft.AspNetCore.Hosting (1)
src\Shared\HttpExtensions.cs (1)
58context.SetEndpoint(endpoint: null);
Microsoft.AspNetCore.Http.Abstractions.Tests (5)
EndpointHttpContextExtensionsTests.cs (5)
65context.SetEndpoint(null); 79context.SetEndpoint(endpoint); 101context.SetEndpoint(endpoint); 122context.SetEndpoint(null); 138context.SetEndpoint(initialEndpoint);
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
760newHttpContext.SetEndpoint(context.GetEndpoint());
Microsoft.AspNetCore.Http.Connections.Tests (1)
HttpConnectionDispatcherTests.cs (1)
781context.SetEndpoint(new Endpoint(null, null, "TestName"));
Microsoft.AspNetCore.Http.Microbenchmarks (1)
RequestTimeoutsMiddlewareBenchmark.cs (1)
118context.SetEndpoint(endpoint);
Microsoft.AspNetCore.Http.Tests (12)
ApplicationBuilderTests.cs (2)
67httpContext.SetEndpoint(endpoint); 149httpContext.SetEndpoint(endpoint);
Timeouts\RequestTimeoutsMiddlewareTests.cs (10)
34context.SetEndpoint(endpoint); 50context.SetEndpoint(endpoint); 65context.SetEndpoint(endpoint); 80context.SetEndpoint(endpoint); 113context.SetEndpoint(endpoint); 129context.SetEndpoint(endpoint); 145context.SetEndpoint(endpoint); 166context.SetEndpoint(endpoint); 181context.SetEndpoint(endpoint); 229context.SetEndpoint(endpoint);
Microsoft.AspNetCore.Mvc.Core.Test (4)
Authorization\AuthorizeFilterTest.cs (1)
556ActionContext.HttpContext.SetEndpoint(new Endpoint(
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (1)
210context.SetEndpoint(new Endpoint(null, metadata, string.Empty));
Routing\EndpointRoutingUrlHelperTest.cs (2)
55urlHelper.ActionContext.HttpContext.SetEndpoint(endpoint1); 141httpContext.SetEndpoint(new Endpoint(context => Task.CompletedTask, EndpointMetadataCollection.Empty, null));
Microsoft.AspNetCore.Mvc.Razor.Test (1)
TagHelpers\UrlResolutionTagHelperTest.cs (1)
407httpContext.SetEndpoint(new Endpoint(
Microsoft.AspNetCore.Mvc.TagHelpers.Test (12)
ImageTagHelperTest.cs (1)
197helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint());
LinkTagHelperTest.cs (4)
750helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); 791helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); 925helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); 1080helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint());
ScriptTagHelperTest.cs (7)
659helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); 696helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); 742helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); 786helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint(importMap)); 882helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); 1012helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint()); 1051helper.ViewContext.HttpContext.SetEndpoint(CreateEndpoint());
Microsoft.AspNetCore.RateLimiting.Tests (20)
RateLimitingMetricsTests.cs (4)
209context1.SetEndpoint(endpoint); 217context2.SetEndpoint(endpoint); 278context1.SetEndpoint(endpoint); 286context2.SetEndpoint(endpoint);
RateLimitingMiddlewareTests.cs (16)
175context.SetEndpoint(endpoint); 206context.SetEndpoint(endpoint); 242context.SetEndpoint(endpoint); 273context.SetEndpoint(endpoint); 305context.SetEndpoint(endpoint); 337context.SetEndpoint(endpoint); 369context.SetEndpoint(endpoint); 412context.SetEndpoint(endpoint); 448context.SetEndpoint(endpoint1); 456context.SetEndpoint(endpoint2); 501context.SetEndpoint(endpoint1); 509context.SetEndpoint(endpoint2); 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")); 572context.SetEndpoint(endpoint); 612context.SetEndpoint(endpoint.Build());
Microsoft.AspNetCore.Rewrite (1)
RewriteMiddleware.cs (1)
79context.SetEndpoint(endpoint: null);
Microsoft.AspNetCore.Routing (9)
Matching\AcceptsMatcherPolicy.cs (1)
132httpContext.SetEndpoint(CreateRejectionEndpoint());
Matching\DefaultEndpointSelector.cs (2)
39httpContext.SetEndpoint(state.Endpoint); 102httpContext.SetEndpoint(endpoint);
Matching\DfaMatcher.cs (1)
78httpContext.SetEndpoint(candidate.Endpoint);
Matching\EndpointSelector.cs (1)
23/// <see cref="EndpointHttpContextExtensions.SetEndpoint(HttpContext, Endpoint)"/>
Matching\HttpMethodMatcherPolicy.cs (1)
152httpContext.SetEndpoint(CreateRejectionEndpoint(methods?.OrderBy(m => m, StringComparer.OrdinalIgnoreCase)));
Matching\IEndpointSelectorPolicy.cs (1)
41/// calling <see cref="EndpointHttpContextExtensions.SetEndpoint(HttpContext, Endpoint)"/>
Matching\NegotiationMatcherPolicy.cs (1)
140httpContext.SetEndpoint(CreateRejectionEndpoint());
src\Shared\HttpExtensions.cs (1)
58context.SetEndpoint(endpoint: null);
Microsoft.AspNetCore.Routing.Microbenchmarks (6)
EndpointRoutingShortCircuitBenchmark.cs (1)
92httpContext.SetEndpoint(_endpoint);
Matching\TrivialMatcher.cs (1)
30httpContext.SetEndpoint(_endpoint);
src\Http\Routing\test\UnitTests\Matching\BarebonesMatcher.cs (2)
29httpContext.SetEndpoint(Matchers[i].Endpoint); 117httpContext.SetEndpoint(Endpoint);
src\Http\Routing\test\UnitTests\Matching\RouteMatcherBuilder.cs (1)
98routeContext.HttpContext.SetEndpoint(null);
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcherBuilder.cs (1)
100routeContext.HttpContext.SetEndpoint(null);
Microsoft.AspNetCore.Routing.Tests (37)
EndpointMiddlewareTest.cs (12)
47httpContext.SetEndpoint(null); 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")); 146c.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(formOptionsMetadata), "myapp")); 151httpContext.SetEndpoint(endpoint); 178c.SetEndpoint(new Endpoint(c => Task.CompletedTask, new EndpointMetadataCollection(formOptionsMetadata), "myapp")); 183httpContext.SetEndpoint(endpoint);
EndpointRoutingMiddlewareTest.cs (5)
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"));
Matching\BarebonesMatcher.cs (2)
29httpContext.SetEndpoint(Matchers[i].Endpoint); 117httpContext.SetEndpoint(Endpoint);
Matching\DfaMatcherTest.cs (4)
663c.SetEndpoint(endpoint2); 709c.SetEndpoint(endpoint2); 756c.SetEndpoint(endpoint2); 1036c.SetEndpoint(cs[0].Endpoint);
Matching\RouteMatcherBuilder.cs (1)
98routeContext.HttpContext.SetEndpoint(null);
Matching\TreeRouterMatcherBuilder.cs (1)
100routeContext.HttpContext.SetEndpoint(null);
RoutingMetricsTests.cs (3)
32c.SetEndpoint(routeEndpointBuilder.Build()); 66c.SetEndpoint(routeEndpointBuilder.Build()); 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.StaticAssets (1)
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
203ctx.SetEndpoint(null);
Microsoft.AspNetCore.StaticFiles (1)
StaticFilesEndpointRouteBuilderExtensions.cs (1)
191context.SetEndpoint(null);
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)
137context.SetEndpoint(endpoint);