CreatedNegotiatedContentResult<T> Constructor
Namespace: System.Web.Http.Results
Assembly: System.Web.Http (in System.Web.Http.dll)
Overload List
Name | Description | |
---|---|---|
CreatedNegotiatedContentResult<T>(Uri, T, ApiController) | Initializes a new instance of the CreatedNegotiatedContentResult<T> class with the values provided. |
|
CreatedNegotiatedContentResult<T>(Uri, T, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>) | Initializes a new instance of the OkNegotiatedContentResult<T> class with the values provided. |
See Also
CreatedNegotiatedContentResult<T> Class
System.Web.Http.Results Namespace
Return to top
CreatedNegotiatedContentResult<T> Constructor (Uri, T, ApiController)
Initializes a new instance of the CreatedNegotiatedContentResult<T> class with the values provided.
Syntax
public CreatedNegotiatedContentResult(
Uri location,
T content,
ApiController controller
)
public:
CreatedNegotiatedContentResult(
Uri^ location,
T content,
ApiController^ controller
)
new :
location:Uri *
content:'T *
controller:ApiController -> CreatedNegotiatedContentResult
Public Sub New (
location As Uri,
content As T,
controller As ApiController
)
Parameters
location
Type: System.UriThe location at which the content has been created.
content
Type: TThe content value to negotiate and format in the entity body.
controller
Type: System.Web.Http.ApiControllerThe controller from which to obtain the dependencies needed for execution.
Return to top
CreatedNegotiatedContentResult<T> Constructor (Uri, T, IContentNegotiator, HttpRequestMessage, IEnumerable<MediaTypeFormatter>)
Initializes a new instance of the OkNegotiatedContentResult<T> class with the values provided.
Syntax
public CreatedNegotiatedContentResult(
Uri location,
T content,
IContentNegotiator contentNegotiator,
HttpRequestMessage request,
IEnumerable<MediaTypeFormatter> formatters
)
public:
CreatedNegotiatedContentResult(
Uri^ location,
T content,
IContentNegotiator^ contentNegotiator,
HttpRequestMessage^ request,
IEnumerable<MediaTypeFormatter^>^ formatters
)
new :
location:Uri *
content:'T *
contentNegotiator:IContentNegotiator *
request:HttpRequestMessage *
formatters:IEnumerable<MediaTypeFormatter> -> CreatedNegotiatedContentResult
Public Sub New (
location As Uri,
content As T,
contentNegotiator As IContentNegotiator,
request As HttpRequestMessage,
formatters As IEnumerable(Of MediaTypeFormatter)
)
Parameters
location
Type: System.UriThe content value to negotiate and format in the entity body.
content
Type: TThe location at which the content has been created.
contentNegotiator
Type: System.Net.Http.Formatting.IContentNegotiatorThe content negotiator to handle content negotiation.
request
Type: System.Net.Http.HttpRequestMessageThe 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