AppBuilderUseExtensions.Use Method (IAppBuilder, Func<IOwinContext, Func<Task>, Task>)

Inserts a middleware into the OWIN pipeline.

Namespace:  Owin
Assembly:  Microsoft.Owin (in Microsoft.Owin.dll)


<ExtensionAttribute> _
Public Shared Function Use ( _
    app As IAppBuilder, _
    handler As Func(Of IOwinContext, Func(Of Task), Task) _
) As IAppBuilder
Dim app As IAppBuilder 
Dim handler As Func(Of IOwinContext, Func(Of Task), Task)
Dim returnValue As IAppBuilder 

returnValue = app.Use(handler)
public static IAppBuilder Use(
    this IAppBuilder app,
    Func<IOwinContext, Func<Task>, Task> handler
static IAppBuilder^ Use(
    IAppBuilder^ app, 
    Func<IOwinContext^, Func<Task^>^, Task^>^ handler
static member Use : 
        app:IAppBuilder * 
        handler:Func<IOwinContext, Func<Task>, Task> -> IAppBuilder
public static function Use(
    app : IAppBuilder, 
    handler : Func<IOwinContext, Func<Task>, Task>
) : IAppBuilder


  • app
    Type: IAppBuilder

Return Value

Type: IAppBuilder
Returns IAppBuilder.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IAppBuilder. When you use instance method syntax to call this method, omit the first parameter. For more information, see b8020aae-374d-46a9-bcb7-8cc2390b93b6 or 175ce3ff-9bbf-4e64-8421-faeb81a0bb51.

See Also


AppBuilderUseExtensions Class

Use Overload

Owin Namespace