Namespace:   System.Web.Http.Results
Assembly:  System.Web.Http (in System.Web.Http.dll)
Overload List
| Name | Description | |
|---|---|---|
| .jpeg) | FormattedContentResult<T>(HttpStatusCode, T, MediaTypeFormatter, MediaTypeHeaderValue, ApiController) | Initializes a new instance of the FormattedContentResult<T> class with the values provided. | 
| .jpeg) | FormattedContentResult<T>(HttpStatusCode, T, MediaTypeFormatter, MediaTypeHeaderValue, HttpRequestMessage) | Initializes a new instance of the FormattedContentResult<T> class with the values provided. | 
See Also
FormattedContentResult<T> Class
System.Web.Http.Results Namespace
Return to top
FormattedContentResult<T> Constructor (HttpStatusCode, T, MediaTypeFormatter, MediaTypeHeaderValue, ApiController)
Initializes a new instance of the FormattedContentResult<T> class with the values provided.
Syntax
public FormattedContentResult(
    HttpStatusCode statusCode,
    T content,
    MediaTypeFormatter formatter,
    MediaTypeHeaderValue mediaType,
    ApiController controller
)
public:
FormattedContentResult(
    HttpStatusCode statusCode,
    T content,
    MediaTypeFormatter^ formatter,
    MediaTypeHeaderValue^ mediaType,
    ApiController^ controller
)
new : 
        statusCode:HttpStatusCode *
        content:'T *
        formatter:MediaTypeFormatter *
        mediaType:MediaTypeHeaderValue *
        controller:ApiController -> FormattedContentResult
Public Sub New (
    statusCode As HttpStatusCode,
    content As T,
    formatter As MediaTypeFormatter,
    mediaType As MediaTypeHeaderValue,
    controller As ApiController
)
Parameters
- statusCode 
 Type: System.Net.HttpStatusCode- The HTTP status code for the response message. 
- content 
 Type: T- The content value to format in the entity body. 
- formatter 
 Type: System.Net.Http.Formatting.MediaTypeFormatter- The formatter to use to format the content. 
- mediaType 
 Type: System.Net.Http.Headers.MediaTypeHeaderValue- The value for the Content-Type header, or null to have the formatter pick a default value. 
- controller 
 Type: System.Web.Http.ApiController- The controller from which to obtain the dependencies needed for execution. 
Return to top
FormattedContentResult<T> Constructor (HttpStatusCode, T, MediaTypeFormatter, MediaTypeHeaderValue, HttpRequestMessage)
Initializes a new instance of the FormattedContentResult<T> class with the values provided.
Syntax
public FormattedContentResult(
    HttpStatusCode statusCode,
    T content,
    MediaTypeFormatter formatter,
    MediaTypeHeaderValue mediaType,
    HttpRequestMessage request
)
public:
FormattedContentResult(
    HttpStatusCode statusCode,
    T content,
    MediaTypeFormatter^ formatter,
    MediaTypeHeaderValue^ mediaType,
    HttpRequestMessage^ request
)
new : 
        statusCode:HttpStatusCode *
        content:'T *
        formatter:MediaTypeFormatter *
        mediaType:MediaTypeHeaderValue *
        request:HttpRequestMessage -> FormattedContentResult
Public Sub New (
    statusCode As HttpStatusCode,
    content As T,
    formatter As MediaTypeFormatter,
    mediaType As MediaTypeHeaderValue,
    request As HttpRequestMessage
)
Parameters
- statusCode 
 Type: System.Net.HttpStatusCode- The HTTP status code for the response message. 
- content 
 Type: T- The content value to format in the entity body. 
- formatter 
 Type: System.Net.Http.Formatting.MediaTypeFormatter- The formatter to use to format the content. 
- mediaType 
 Type: System.Net.Http.Headers.MediaTypeHeaderValue- The value for the Content-Type header, or null to have the formatter pick a default value. 
- request 
 Type: System.Net.Http.HttpRequestMessage- The request message which led to this result. 
Return to top