ApiController.Content<T>(HttpStatusCode, T) Yöntem

Tanım

Belirtilen değerlerle bir NegotiatedContentResult<T> oluşturur.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual System.Web.Http.NegotiatedContentResult<T> Content<T> (System.Net.HttpStatusCode statusCode, T value);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Content : System.Net.HttpStatusCode * 'T -> System.Web.Http.NegotiatedContentResult<'T>
override this.Content : System.Net.HttpStatusCode * 'T -> System.Web.Http.NegotiatedContentResult<'T>
Public Overridable Function Content(Of T) (statusCode As HttpStatusCode, value As T) As NegotiatedContentResult(Of T)

Tür Parametreleri

T

Varlık gövdesindeki içerik türü.

Parametreler

statusCode
HttpStatusCode

Yanıt iletisinin HTTP durum kodu.

value
T

Varlık gövdesinde anlaşmak ve biçimlendirmek için içerik değeri.

Döndürülenler

Belirtilen değerlere sahip A NegotiatedContentResult<T> .

Öznitelikler

Şunlara uygulanır