Table of Contents

Class ValueResultConverter<T>

Namespace
System.Web.Http.Controllers
Assembly
System.Web.Http.dll

A converter for creating responses from actions that return an arbitrary T value.

public class ValueResultConverter<T> : IActionResultConverter

Type Parameters

T

The declared return type of an action.

Inheritance
ValueResultConverter<T>
Implements
Inherited Members

Constructors

ValueResultConverter()

Initializes a new instance of the ValueResultConverter<T> class.

public ValueResultConverter()

Methods

Convert(HttpControllerContext, object)

Converts the result of an action with arbitrary return type T to an instance of HttpResponseMessage.

public HttpResponseMessage Convert(HttpControllerContext controllerContext, object actionResult)

Parameters

controllerContext HttpControllerContext

The action controller context.

actionResult object

The execution result.

Returns

HttpResponseMessage

The newly created HttpResponseMessage object.