ValueResultConverter<T>.Convert Method
Converts the result of an action with arbitrary return type T to an instance of HttpResponseMessage.
Namespace: System.Web.Http.Controllers
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
Public Function Convert ( _
controllerContext As HttpControllerContext, _
actionResult As Object _
) As HttpResponseMessage
'Usage
Dim instance As ValueResultConverter
Dim controllerContext As HttpControllerContext
Dim actionResult As Object
Dim returnValue As HttpResponseMessage
returnValue = instance.Convert(controllerContext, _
actionResult)
public HttpResponseMessage Convert(
HttpControllerContext controllerContext,
Object actionResult
)
public:
virtual HttpResponseMessage^ Convert(
HttpControllerContext^ controllerContext,
Object^ actionResult
) sealed
abstract Convert :
controllerContext:HttpControllerContext *
actionResult:Object -> HttpResponseMessage
override Convert :
controllerContext:HttpControllerContext *
actionResult:Object -> HttpResponseMessage
public final function Convert(
controllerContext : HttpControllerContext,
actionResult : Object
) : HttpResponseMessage
Parameters
controllerContext
Type: System.Web.Http.Controllers.HttpControllerContextThe action controller context.
actionResult
Type: System.ObjectThe execution result.
Return Value
Type: HttpResponseMessage
The newly created HttpResponseMessage object.
Implements
IActionResultConverter.Convert(HttpControllerContext, Object)