Table of Contents

Class WebApplicationBuilderExtensions

Namespace
Biwen.QuickApi
Assembly
Biwen.QuickApi.dll

IApplicationBuilder extension methods.

[SuppressType]
public static class WebApplicationBuilderExtensions
Inheritance
WebApplicationBuilderExtensions
Inherited Members

Methods

UseIf(WebApplication, bool, Action<WebApplication>)

Executes the specified action if the specified condition is true which can be used to conditionally add to the request execution pipeline.

public static WebApplication UseIf(this WebApplication application, bool condition, Action<WebApplication> action)

Parameters

application WebApplication

The application builder.

condition bool

If set to true the action is executed.

action Action<WebApplication>

The action used to add to the request execution pipeline.

Returns

WebApplication

The same application builder.

UseIfElse(WebApplication, bool, Action<WebApplication>, Action<WebApplication>)

Executes the specified ifAction if the specified condition is true, otherwise executes the elseAction. This can be used to conditionally add to the request execution pipeline.

public static WebApplication UseIfElse(this WebApplication application, bool condition, Action<WebApplication> ifAction, Action<WebApplication> elseAction)

Parameters

application WebApplication

The application builder.

condition bool

If set to true the ifAction is executed, otherwise the elseAction is executed.

ifAction Action<WebApplication>

The action used to add to the request execution pipeline if the condition is true.

elseAction Action<WebApplication>

The action used to add to the request execution pipeline if the condition is false.

Returns

WebApplication

The same application builder.