Sisk

Method

HttpContext.EnqueueDeferredAction

Namespace
Sisk.Core.Http
Assembly
Sisk.Core.dll

EnqueueDeferredAction(Action) #

Enqueues an action that will be executed after the response is sent to the client. This action runs within the same context, with access to all current context properties before disposal.

C#
public void EnqueueDeferredAction(Action action)

Parameters #

action Action

The synchronous action to execute.

EnqueueDeferredAction(Func<Task>) #

Enqueues an asynchronous action that will be executed after the response is sent to the client. This action runs within the same context, with access to all current context properties before disposal.

C#
public void EnqueueDeferredAction(Func<Task> action)

Parameters #

action Func<Task>

The asynchronous action to execute.

EnqueueDeferredAction(Func<CancellationToken, Task>, CancellationToken) #

Enqueues an asynchronous action that will be executed after the response is sent to the client. This action runs within the same context, with access to all current context properties before disposal.

C#
public void EnqueueDeferredAction(Func<CancellationToken, Task> action, CancellationToken cancellation = default)

Parameters #

action Func<CancellationToken, Task>

The asynchronous action to execute.

cancellation CancellationToken

The cancellation token to observe.

EnqueueDeferredAction(Func<CancellationToken, Task>, TimeSpan) #

Enqueues an asynchronous action that will be executed after the response is sent to the client, with a timeout after which the action will be cancelled. This action runs within the same context, with access to all current context properties before disposal.

C#
public void EnqueueDeferredAction(Func<CancellationToken, Task> action, TimeSpan timeout = default)

Parameters #

action Func<CancellationToken, Task>

The asynchronous action to execute.

timeout TimeSpan

The timeout after which the action will be cancelled.

Type to search the documentation and the API reference.