UseMiddlewareExtensions.UseMiddleware 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
UseMiddleware(IApplicationBuilder, Type, Object[]) |
將中介軟體類型新增至應用程式的要求管線。 |
UseMiddleware<TMiddleware>(IApplicationBuilder, Object[]) |
將中介軟體類型新增至應用程式的要求管線。 |
UseMiddleware(IApplicationBuilder, Type, Object[])
將中介軟體類型新增至應用程式的要求管線。
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
參數
IApplicationBuilder 執行個體。
- middleware
- Type
中介軟體類型。
- args
- Object[]
要傳遞至中介軟體類型實例建構函式的引數。
傳回
IApplicationBuilder 執行個體。
適用於
UseMiddleware<TMiddleware>(IApplicationBuilder, Object[])
將中介軟體類型新增至應用程式的要求管線。
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
中介軟體類型。
參數
IApplicationBuilder 執行個體。
- args
- Object[]
要傳遞至中介軟體類型實例建構函式的引數。
傳回
IApplicationBuilder 執行個體。