IActionResultExecutor<TResult> Interface

Definition

Defines an interface for a service which can execute a particular kind of IActionResult by manipulating the HttpResponse.

C#
public interface IActionResultExecutor<in TResult> where TResult : IActionResult

Type Parameters

TResult

The type of IActionResult.

This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
Derived

Remarks

Implementations of IActionResultExecutor<TResult> are typically called by the ExecuteResultAsync(ActionContext) method of the corresponding action result type. Implementations should be registered as singleton services.

Methods

ExecuteAsync(ActionContext, TResult)

Asynchronously executes the action result, by modifying the HttpResponse.

Applies to

Tuote Versiot
ASP.NET Core 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0