IApplicationBuilder.Use(Func<RequestDelegate,RequestDelegate>) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a middleware delegate to the application's request pipeline.
public:
Microsoft::AspNetCore::Builder::IApplicationBuilder ^ Use(Func<Microsoft::AspNetCore::Http::RequestDelegate ^, Microsoft::AspNetCore::Http::RequestDelegate ^> ^ middleware);
C#
public Microsoft.AspNetCore.Builder.IApplicationBuilder Use (Func<Microsoft.AspNetCore.Http.RequestDelegate,Microsoft.AspNetCore.Http.RequestDelegate> middleware);
abstract member Use : Func<Microsoft.AspNetCore.Http.RequestDelegate, Microsoft.AspNetCore.Http.RequestDelegate> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
Public Function Use (middleware As Func(Of RequestDelegate, RequestDelegate)) As IApplicationBuilder
- middleware
- Func<RequestDelegate,RequestDelegate>
The middleware delegate.
The IApplicationBuilder.
Product | Versions |
---|---|
ASP.NET Core | 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |