MapWhenExtensions.MapWhenAsync Method
Branches the request pipeline based on the async result of the given predicate.
Namespace: Owin
Assembly: Microsoft.Owin (in Microsoft.Owin.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function MapWhenAsync ( _
app As IAppBuilder, _
predicate As Func(Of IOwinContext, Task(Of Boolean)), _
configuration As Action(Of IAppBuilder) _
) As IAppBuilder
'Usage
Dim app As IAppBuilder
Dim predicate As Func(Of IOwinContext, Task(Of Boolean))
Dim configuration As Action(Of IAppBuilder)
Dim returnValue As IAppBuilder
returnValue = app.MapWhenAsync(predicate, _
configuration)
public static IAppBuilder MapWhenAsync(
this IAppBuilder app,
Func<IOwinContext, Task<bool>> predicate,
Action<IAppBuilder> configuration
)
[ExtensionAttribute]
public:
static IAppBuilder^ MapWhenAsync(
IAppBuilder^ app,
Func<IOwinContext^, Task<bool>^>^ predicate,
Action<IAppBuilder^>^ configuration
)
static member MapWhenAsync :
app:IAppBuilder *
predicate:Func<IOwinContext, Task<bool>> *
configuration:Action<IAppBuilder> -> IAppBuilder
public static function MapWhenAsync(
app : IAppBuilder,
predicate : Func<IOwinContext, Task<boolean>>,
configuration : Action<IAppBuilder>
) : IAppBuilder
Parameters
- app
Type: IAppBuilder
- predicate
Type: System.Func<IOwinContext, Task<Boolean>>
Invoked asynchronously with the request environment to determine if the branch should be taken
- configuration
Type: System.Action<IAppBuilder>
Configures a branch to take
Return Value
Type: 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 https://msdn.microsoft.com/en-us/library/bb384936(v=vs.111) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.111).