NegotiatedContentResult<T> Class¶
An action result that performs content negotiation.
- Namespace
System.Web.Http
- Assemblies
- Microsoft.AspNetCore.Mvc.WebApiCompatShim
Syntax¶
public class NegotiatedContentResult<T> : ObjectResult, IActionResult
-
class
System.Web.Http.
NegotiatedContentResult<T>
¶
Constructors¶
-
NegotiatedContentResult
(System.Net.HttpStatusCode, T)¶ Initializes a new instance of the
System.Web.Http.NegotiatedContentResult`1
class with the values provided.Arguments: - statusCode (System.Net.HttpStatusCode) – The HTTP status code for the response message.
- content (T) – The content value to negotiate and format in the entity body.
public NegotiatedContentResult(HttpStatusCode statusCode, T content)
-
Properties¶
-
System.Web.Http.NegotiatedContentResult<T>.
Content
¶ Gets the content value to negotiate and format in the entity body.
Return type: T public T Content { get; }
-