96 references to UseMiddleware
Aspire.Dashboard (2)
DashboardWebApplication.cs (2)
362_app.UseMiddleware<ValidateTokenMiddleware>(); 400_app.UseMiddleware<BrowserSecurityHeadersMiddleware>();
Aspire.Dashboard.Tests (1)
Middleware\ValidateTokenMiddlewareTests.cs (1)
92app.UseMiddleware<ValidateTokenMiddleware>();
BasicLinkedApp (1)
Startup.cs (1)
15app.UseMiddleware<HelloWorldMiddleware>();
BasicWebSite (2)
Startup.cs (1)
31app.UseMiddleware<RequestIdMiddleware>();
StartupWithoutEndpointRouting.cs (1)
78app.UseMiddleware<RequestIdMiddleware>();
CorsMiddlewareWebSite (1)
Startup.cs (1)
16app.UseMiddleware<EchoMiddleware>();
Diagnostics.EFCore.FunctionalTests (6)
DatabaseErrorPageMiddlewareTest.cs (5)
36.UseMiddleware<SuccessMiddleware>()); 73.UseMiddleware<ExceptionMiddleware>()); 349app.UseMiddleware<PendingMigrationsMiddleware>(); 388app.UseMiddleware<ContextNotRegisteredInServicesMiddleware>(); 531app.UseMiddleware<TMiddleware>();
MigrationsEndPointMiddlewareTest.cs (1)
33.UseMiddleware<SuccessMiddleware>());
Http2SampleApp (1)
TimingMiddleware.cs (1)
50return builder.UseMiddleware<TimingMiddleware>();
IIS.Microbenchmarks (1)
PlaintextBenchmark.cs (1)
26_server = TestServer.Create(builder => builder.UseMiddleware<PlaintextMiddleware>(), new LoggerFactory(), new IISServerOptions()).GetAwaiter().GetResult();
Microsoft.AspNetCore.Antiforgery (1)
AntiforgeryApplicationBuilderExtensions.cs (1)
27builder.UseMiddleware<AntiforgeryMiddleware>();
Microsoft.AspNetCore.Authentication (1)
AuthAppBuilderExtensions.cs (1)
25return app.UseMiddleware<AuthenticationMiddleware>();
Microsoft.AspNetCore.Authorization.Policy (1)
AuthorizationAppBuilderExtensions.cs (1)
33return app.UseMiddleware<AuthorizationMiddlewareInternal>();
Microsoft.AspNetCore.Components.Server (2)
Builder\ComponentEndpointRouteBuilderExtensions.cs (2)
83endpoints.CreateApplicationBuilder().UseMiddleware<CircuitDisconnectMiddleware>().Build()) 88endpoints.CreateApplicationBuilder().UseMiddleware<CircuitJavaScriptInitializationMiddleware>().Build())
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
ComponentsWebAssemblyApplicationBuilderExtensions.cs (1)
68subBuilder.UseMiddleware<ContentEncodingNegotiator>();
Microsoft.AspNetCore.ConcurrencyLimiter (1)
ConcurrencyLimiterExtensions.cs (1)
23return app.UseMiddleware<ConcurrencyLimiterMiddleware>();
Microsoft.AspNetCore.CookiePolicy (2)
CookiePolicyAppBuilderExtensions.cs (2)
23return app.UseMiddleware<CookiePolicyMiddleware>(); 37return app.UseMiddleware<CookiePolicyMiddleware>(Options.Create(options));
Microsoft.AspNetCore.Cors (3)
Infrastructure\CorsMiddlewareExtensions.cs (3)
22return app.UseMiddleware<CorsMiddleware>(); 35return app.UseMiddleware<CorsMiddleware>(policyName); 53return app.UseMiddleware<CorsMiddleware>(policyBuilder.Build());
Microsoft.AspNetCore.Diagnostics (8)
DeveloperExceptionPage\DeveloperExceptionPageExtensions.cs (2)
27return app.UseMiddleware<DeveloperExceptionPageMiddlewareImpl>(); 47return app.UseMiddleware<DeveloperExceptionPageMiddlewareImpl>(Options.Create(options));
ExceptionHandler\ExceptionHandlerExtensions.cs (2)
141return app.UseMiddleware<ExceptionHandlerMiddlewareImpl>(); 144return app.UseMiddleware<ExceptionHandlerMiddlewareImpl>(options);
StatusCodePage\StatusCodePagesExtensions.cs (2)
30return app.UseMiddleware<StatusCodePagesMiddleware>(Options.Create(options)); 43return app.UseMiddleware<StatusCodePagesMiddleware>();
WelcomePage\WelcomePageExtensions.cs (2)
26return app.UseMiddleware<WelcomePageMiddleware>(Options.Create(options)); 70return app.UseMiddleware<WelcomePageMiddleware>();
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (2)
DatabaseErrorPageExtensions.cs (1)
47app = app.UseMiddleware<DatabaseErrorPageMiddleware>(Options.Create(options));
MigrationsEndPointExtensions.cs (1)
38return app.UseMiddleware<MigrationsEndPointMiddleware>(Options.Create(options));
Microsoft.AspNetCore.Diagnostics.HealthChecks (2)
Builder\HealthCheckApplicationBuilderExtensions.cs (1)
229app.MapWhen(predicate, b => b.UseMiddleware<HealthCheckMiddleware>(args));
Builder\HealthCheckEndpointRouteBuilderExtensions.cs (1)
68.UseMiddleware<HealthCheckMiddleware>(args)
Microsoft.AspNetCore.Diagnostics.Middleware (3)
Latency\CapturePipelineEntryStartupFilter.cs (1)
25_ = builder.UseMiddleware<CapturePipelineEntryMiddleware>();
Latency\RequestLatencyTelemetryApplicationBuilderExtensions.cs (2)
24.UseMiddleware<CaptureResponseTimeMiddleware>() 25.UseMiddleware<CapturePipelineExitMiddleware>();
Microsoft.AspNetCore.HeaderPropagation (1)
DependencyInjection\HeaderPropagationApplicationBuilderExtensions.cs (1)
36return app.UseMiddleware<HeaderPropagationMiddleware>();
Microsoft.AspNetCore.HeaderPropagation.Tests (1)
HeaderPropagationIntegrationTest.cs (1)
204app.UseMiddleware<SimpleMiddleware>();
Microsoft.AspNetCore.HostFiltering (1)
HostFilteringBuilderExtensions.cs (1)
23app.UseMiddleware<HostFilteringMiddleware>();
Microsoft.AspNetCore.Http (1)
Timeouts\RequestTimeoutsIApplicationBuilderExtensions.cs (1)
23return builder.UseMiddleware<RequestTimeoutsMiddleware>();
Microsoft.AspNetCore.Http.Abstractions (1)
Extensions\UsePathBaseExtensions.cs (1)
42return app.UseMiddleware<UsePathBaseMiddleware>(pathBase);
Microsoft.AspNetCore.HttpLogging (2)
HttpLoggingBuilderExtensions.cs (2)
27app.UseMiddleware<HttpLoggingMiddleware>(); 42app.UseMiddleware<W3CLoggingMiddleware>();
Microsoft.AspNetCore.HttpOverrides (5)
CertificateForwardingBuilderExtensions.cs (1)
23return app.UseMiddleware<CertificateForwardingMiddleware>();
ForwardedHeadersExtensions.cs (2)
34return builder.UseMiddleware<ForwardedHeadersMiddleware>(); 55return builder.UseMiddleware<ForwardedHeadersMiddleware>(Options.Create(options));
HttpMethodOverrideExtensions.cs (2)
24return builder.UseMiddleware<HttpMethodOverrideMiddleware>(); 40return builder.UseMiddleware<HttpMethodOverrideMiddleware>(Options.Create(options));
Microsoft.AspNetCore.HttpsPolicy (3)
HstsBuilderExtensions.cs (1)
21return app.UseMiddleware<HstsMiddleware>();
HttpsRedirectionBuilderExtensions.cs (2)
26app.UseMiddleware<HttpsRedirectionMiddleware>(serverAddressFeature); 30app.UseMiddleware<HttpsRedirectionMiddleware>();
Microsoft.AspNetCore.Localization (4)
ApplicationBuilderExtensions.cs (4)
24return app.UseMiddleware<RequestLocalizationMiddleware>(); 41return app.UseMiddleware<RequestLocalizationMiddleware>(Options.Create(options)); 64return app.UseMiddleware<RequestLocalizationMiddleware>(Options.Create(options)); 94return app.UseMiddleware<RequestLocalizationMiddleware>(Options.Create(options));
Microsoft.AspNetCore.MiddlewareAnalysis (3)
AnalysisBuilder.cs (2)
52return InnerBuilder.UseMiddleware<AnalysisMiddleware>("EndOfPipeline") 72return InnerBuilder.UseMiddleware<AnalysisMiddleware>(middlewareName)
AnalysisStartupFilter.cs (1)
31builder.UseMiddleware<AnalysisMiddleware>("EndOfPipeline");
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
Infrastructure\CultureReplacerStartupFilter.cs (1)
21builder.UseMiddleware<CultureReplacerMiddleware>();
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheApplicationBuilderExtensions.cs (1)
21return app.UseMiddleware<OutputCacheMiddleware>();
Microsoft.AspNetCore.RateLimiting (2)
RateLimiterApplicationBuilderExtensions.cs (2)
27return app.UseMiddleware<RateLimitingMiddleware>(); 43return app.UseMiddleware<RateLimitingMiddleware>(Options.Create(options));
Microsoft.AspNetCore.RequestDecompression (1)
RequestDecompressionBuilderExtensions.cs (1)
21return builder.UseMiddleware<RequestDecompressionMiddleware>();
Microsoft.AspNetCore.ResponseCaching (1)
ResponseCachingExtensions.cs (1)
21return app.UseMiddleware<ResponseCachingMiddleware>();
Microsoft.AspNetCore.ResponseCompression (1)
ResponseCompressionBuilderExtensions.cs (1)
21return builder.UseMiddleware<ResponseCompressionMiddleware>();
Microsoft.AspNetCore.Rewrite (2)
RewriteBuilderExtensions.cs (2)
69return app.UseMiddleware<RewriteMiddleware>(); 72return app.UseMiddleware<RewriteMiddleware>(options);
Microsoft.AspNetCore.Routing (3)
Builder\EndpointRoutingApplicationBuilderExtensions.cs (2)
62return builder.UseMiddleware<EndpointRoutingMiddleware>(endpointRouteBuilder); 113return builder.UseMiddleware<EndpointMiddleware>();
Builder\RoutingBuilderExtensions.cs (1)
33return builder.UseMiddleware<RouterMiddleware>(router);
Microsoft.AspNetCore.Server.IISIntegration (1)
IISSetupFilter.cs (1)
29app.UseMiddleware<IISMiddleware>(_pairingToken, _isWebsocketsSupported);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
InMemoryTransportBenchmark.cs (1)
54.Configure(app => app.UseMiddleware<PlaintextMiddleware>());
NamedPipesTransportBenchmark.cs (1)
52.Configure(app => app.UseMiddleware<PlaintextMiddleware>())
Microsoft.AspNetCore.Session (2)
SessionMiddlewareExtensions.cs (2)
23return app.UseMiddleware<SessionMiddleware>(); 37return app.UseMiddleware<SessionMiddleware>(Options.Create(options));
Microsoft.AspNetCore.SpaProxy (1)
SpaProxyStartupFilter.cs (1)
32builder.UseMiddleware<SpaProxyMiddleware>();
Microsoft.AspNetCore.StaticFiles (6)
DefaultFilesExtensions.cs (2)
29return app.UseMiddleware<DefaultFilesMiddleware>(); 63return app.UseMiddleware<DefaultFilesMiddleware>(Options.Create(options));
DirectoryBrowserExtensions.cs (2)
29return app.UseMiddleware<DirectoryBrowserMiddleware>(); 63return app.UseMiddleware<DirectoryBrowserMiddleware>(Options.Create(options));
StaticFileExtensions.cs (2)
29return app.UseMiddleware<StaticFileMiddleware>(); 63return app.UseMiddleware<StaticFileMiddleware>(Options.Create(options));
Microsoft.AspNetCore.TestHost.Tests (1)
TestServerTests.cs (1)
417builder.UseMiddleware<TestRequestServiceMiddleware>();
Microsoft.AspNetCore.Tests (3)
WebApplicationTests.cs (3)
2685app.UseMiddleware<MiddlewareWithInterface>(); 2716app.UseMiddleware<MiddlewareWithInterface>(); 2739app.UseMiddleware<MiddlewareWithInterface>();
Microsoft.AspNetCore.WebSockets (2)
WebSocketMiddlewareExtensions.cs (2)
27return app.UseMiddleware<WebSocketMiddleware>(); 47return app.UseMiddleware<WebSocketMiddleware>(Options.Create(options));
RoutingSandbox (1)
HelloExtension\HelloAppBuilderExtensions.cs (1)
15return app.UseMiddleware<HelloMiddleware>(Options.Create(new HelloOptions
RoutingWebSite (1)
HelloExtension\HelloAppBuilderExtensions.cs (1)
15return app.UseMiddleware<HelloMiddleware>(Options.Create(new HelloOptions