Share via


JsonHttpResult<TValue> Sınıf

Tanım

Verilen nesneyi JSON olarak biçimlendiren bir eylem sonucu.

public sealed class JsonHttpResult<TValue> : Microsoft.AspNetCore.Http.IContentTypeHttpResult, Microsoft.AspNetCore.Http.IResult, Microsoft.AspNetCore.Http.IStatusCodeHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult<TValue>
type JsonHttpResult<'Value> = class
    interface IResult
    interface IStatusCodeHttpResult
    interface IValueHttpResult
    interface IValueHttpResult<'Value>
    interface IContentTypeHttpResult
Public NotInheritable Class JsonHttpResult(Of TValue)
Implements IContentTypeHttpResult, IResult, IStatusCodeHttpResult, IValueHttpResult, IValueHttpResult(Of TValue)

Tür Parametreleri

TValue
Devralma
JsonHttpResult<TValue>
Uygulamalar

Özellikler

ContentType

Üst bilgi değerini Content-Type alır.

JsonSerializerOptions

Seri hale getirici ayarlarını alır veya ayarlar.

StatusCode

HTTP durum kodunu alır.

Value

Nesne sonucunu alır.

Yöntemler

ExecuteAsync(HttpContext)

Sonucu yansıtan bir HTTP yanıtı yazın.

Belirtik Arabirim Kullanımları

IValueHttpResult.Value

Verilen nesneyi JSON olarak biçimlendiren bir eylem sonucu.

Şunlara uygulanır