Aracılığıyla paylaş


ValidationProblem Sınıf

Tanım

IResult Yürütmede Sorun Ayrıntıları HTTP API'lerinin yanıtlarını yazması içinhttps://tools.ietf.org/html/rfc7807

public sealed class ValidationProblem : Microsoft.AspNetCore.Http.IContentTypeHttpResult, Microsoft.AspNetCore.Http.IResult, Microsoft.AspNetCore.Http.IStatusCodeHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult<Microsoft.AspNetCore.Http.HttpValidationProblemDetails>, Microsoft.AspNetCore.Http.Metadata.IEndpointMetadataProvider
type ValidationProblem = class
    interface IResult
    interface IEndpointMetadataProvider
    interface IStatusCodeHttpResult
    interface IContentTypeHttpResult
    interface IValueHttpResult
    interface IValueHttpResult<HttpValidationProblemDetails>
Public NotInheritable Class ValidationProblem
Implements IContentTypeHttpResult, IEndpointMetadataProvider, IResult, IStatusCodeHttpResult, IValueHttpResult, IValueHttpResult(Of HttpValidationProblemDetails)
Devralma
ValidationProblem
Uygulamalar

Özellikler

ContentType

Üst bilgi değerini Content-Type alır: application/problem+json.

ProblemDetails

HttpValidationProblemDetails Örneği alır.

StatusCode

HTTP durum kodunu alır: Status400BadRequest

Yöntemler

ExecuteAsync(HttpContext)

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

Belirtik Arabirim Kullanımları

IEndpointMetadataProvider.PopulateMetadata(MethodInfo, EndpointBuilder)

İlgili Endpoint ve MethodInfoiçin meta verileri doldurur.

IStatusCodeHttpResult.StatusCode

IResult Yürütmede Sorun Ayrıntıları HTTP API'lerinin yanıtlarını yazması içinhttps://tools.ietf.org/html/rfc7807

IValueHttpResult.Value

IResult Yürütmede Sorun Ayrıntıları HTTP API'lerinin yanıtlarını yazması içinhttps://tools.ietf.org/html/rfc7807

IValueHttpResult<HttpValidationProblemDetails>.Value

IResult Yürütmede Sorun Ayrıntıları HTTP API'lerinin yanıtlarını yazması içinhttps://tools.ietf.org/html/rfc7807

Şunlara uygulanır