IActionResultTypeMapper.Convert(Object, Type) Method

Definition

Converts the result of an action to an IActionResult for response processing. This method will be not be called when a method returns void or an IActionResult value.

public:
 Microsoft::AspNetCore::Mvc::IActionResult ^ Convert(System::Object ^ value, Type ^ returnType);
public Microsoft.AspNetCore.Mvc.IActionResult Convert (object value, Type returnType);
public Microsoft.AspNetCore.Mvc.IActionResult Convert (object? value, Type returnType);
abstract member Convert : obj * Type -> Microsoft.AspNetCore.Mvc.IActionResult
Public Function Convert (value As Object, returnType As Type) As IActionResult

Parameters

value
Object

The action return value. May be null.

returnType
Type

The declared return type.

Returns

An IActionResult for response processing.

Remarks

Prior to calling this method, the infrastructure will unwrap Task<TResult> or other task-like types.

Applies to