共用方式為


UseMiddlewareExtensions.UseMiddleware 方法

定義

多載

UseMiddleware(IApplicationBuilder, Type, Object[])

將中介軟體類型新增至應用程式的要求管線。

UseMiddleware<TMiddleware>(IApplicationBuilder, Object[])

將中介軟體類型新增至應用程式的要求管線。

UseMiddleware(IApplicationBuilder, Type, Object[])

來源:
UseMiddlewareExtensions.cs
來源:
UseMiddlewareExtensions.cs
來源:
UseMiddlewareExtensions.cs

將中介軟體類型新增至應用程式的要求管線。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseMiddleware(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, Type ^ middleware, ... cli::array <System::Object ^> ^ args);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseMiddleware (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Type middleware, params object[] args);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseMiddleware (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, Type middleware, params object?[] args);
static member UseMiddleware : Microsoft.AspNetCore.Builder.IApplicationBuilder * Type * obj[] -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseMiddleware (app As IApplicationBuilder, middleware As Type, ParamArray args As Object()) As IApplicationBuilder

參數

middleware
Type

中介軟體類型。

args
Object[]

要傳遞至中介軟體類型實例建構函式的引數。

傳回

IApplicationBuilder 執行個體。

適用於

UseMiddleware<TMiddleware>(IApplicationBuilder, Object[])

來源:
UseMiddlewareExtensions.cs
來源:
UseMiddlewareExtensions.cs
來源:
UseMiddlewareExtensions.cs

將中介軟體類型新增至應用程式的要求管線。

public:
generic <typename TMiddleware>
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Builder::IApplicationBuilder ^ UseMiddleware(Microsoft::AspNetCore::Builder::IApplicationBuilder ^ app, ... cli::array <System::Object ^> ^ args);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseMiddleware<TMiddleware> (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, params object[] args);
public static Microsoft.AspNetCore.Builder.IApplicationBuilder UseMiddleware<TMiddleware> (this Microsoft.AspNetCore.Builder.IApplicationBuilder app, params object?[] args);
static member UseMiddleware : Microsoft.AspNetCore.Builder.IApplicationBuilder * obj[] -> Microsoft.AspNetCore.Builder.IApplicationBuilder
<Extension()>
Public Function UseMiddleware(Of TMiddleware) (app As IApplicationBuilder, ParamArray args As Object()) As IApplicationBuilder

類型參數

TMiddleware

中介軟體類型。

參數

args
Object[]

要傳遞至中介軟體類型實例建構函式的引數。

傳回

IApplicationBuilder 執行個體。

適用於