UseExtensions.Use Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Aşırı Yüklemeler
| Use(IApplicationBuilder, Func<HttpContext,RequestDelegate,Task>) |
Uygulamanın istek işlem hattına satır içinde tanımlanmış bir ara yazılım temsilcisi ekler. Bir sonraki işlevi çağırmasanız, bunun yerine Run(IApplicationBuilder, RequestDelegate) kullanın. |
| Use(IApplicationBuilder, Func<HttpContext,Func<Task>,Task>) |
Uygulamanın istek işlem hattına satır içinde tanımlanmış bir ara yazılım temsilcisi ekler. Bir sonraki işlevi çağırmasanız, bunun yerine Run(IApplicationBuilder, RequestDelegate) kullanın. Aşağıda gösterildiği Use(IApplicationBuilder, Func<HttpContext,RequestDelegate,Task>) gibi daha iyi performans için kullanmayı tercih edin:
|
Use(IApplicationBuilder, Func<HttpContext,RequestDelegate,Task>)
Uygulamanın istek işlem hattına satır içinde tanımlanmış bir ara yazılım temsilcisi ekler. Bir sonraki işlevi çağırmasanız, bunun yerine Run(IApplicationBuilder, RequestDelegate) kullanın.
public static Microsoft.AspNetCore.Builder.IApplicationBuilder Use (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Func<Microsoft.AspNetCore.Http.HttpContext,Microsoft.AspNetCore.Http.RequestDelegate,System.Threading.Tasks.Task> middleware);
static member Use : Microsoft.AspNetCore.Builder.IApplicationBuilder * Func<Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Http.RequestDelegate, System.Threading.Tasks.Task> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function Use (app As IApplicationBuilder, middleware As Func(Of HttpContext, RequestDelegate, Task)) As IApplicationBuilder
Parametreler
IApplicationBuilder örneği.
- middleware
- Func<HttpContext,RequestDelegate,Task>
İsteği iş alan ve verilen sonraki işlevi çağıran bir işlev.
Döndürülenler
IApplicationBuilder örneği.
Şunlara uygulanır
Use(IApplicationBuilder, Func<HttpContext,Func<Task>,Task>)
Uygulamanın istek işlem hattına satır içinde tanımlanmış bir ara yazılım temsilcisi ekler. Bir sonraki işlevi çağırmasanız, bunun yerine Run(IApplicationBuilder, RequestDelegate) kullanın.
Aşağıda gösterildiği Use(IApplicationBuilder, Func<HttpContext,RequestDelegate,Task>) gibi daha iyi performans için kullanmayı tercih edin:
app.Use((context, next) =>
{
return next(context);
});
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ Use(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Func<Microsoft::AspNetCore::Http::HttpContext ^, Func<System::Threading::Tasks::Task ^> ^, System::Threading::Tasks::Task ^> ^ middleware);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder Use (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Func<Microsoft.AspNetCore.Http.HttpContext,Func<System.Threading.Tasks.Task>,System.Threading.Tasks.Task> middleware);
static member Use : Microsoft.AspNetCore.Builder.IApplicationBuilder * Func<Microsoft.AspNetCore.Http.HttpContext, Func<System.Threading.Tasks.Task>, System.Threading.Tasks.Task> -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function Use (app As IApplicationBuilder, middleware As Func(Of HttpContext, Func(Of Task), Task)) As IApplicationBuilder
Parametreler
IApplicationBuilder örneği.
- middleware
- Func<HttpContext,Func<Task>,Task>
İsteği iş alan ve verilen sonraki işlevi çağıran bir işlev.
Döndürülenler
IApplicationBuilder örneği.