Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

OkNegotiatedContentResult<T> Constructor

 

OkNegotiatedContentResult<T> Constructor (T, ApiController^)

Initializes a new instance of the OkNegotiatedContentResult<T> class with the values provided.

public:
OkNegotiatedContentResult(
	T content,
	ApiController^ controller
)

Parameters

content
Type: T

The content value to negotiate and format in the entity body.

controller
Type: System.Web.Http::ApiController^

The controller from which to obtain the dependencies needed for execution.

Return to top

OkNegotiatedContentResult<T> Constructor (T, IContentNegotiator^, HttpRequestMessage^, IEnumerable<MediaTypeFormatter^>^)

Initializes a new instance of the OkNegotiatedContentResult<T> class with the values provided.

public:
OkNegotiatedContentResult(
	T content,
	IContentNegotiator^ contentNegotiator,
	HttpRequestMessage^ request,
	IEnumerable<MediaTypeFormatter^>^ formatters
)

Parameters

content
Type: T

The content value to negotiate and format in the entity body.

contentNegotiator
Type: System.Net.Http.Formatting::IContentNegotiator^

The content negotiator to handle content negotiation.

request
Type: System.Net.Http::HttpRequestMessage^

The request message which led to this result.

formatters
Type: System.Collections.Generic::IEnumerable<MediaTypeFormatter^>^

The formatters to use to negotiate and format the content.

Return to top
Show: