InputFormatter Sınıf

Tanım

İstek gövdesinden bir nesneyi okur.

public ref class InputFormatter abstract : Microsoft::AspNetCore::Mvc::ApiExplorer::IApiRequestFormatMetadataProvider, Microsoft::AspNetCore::Mvc::Formatters::IInputFormatter
public abstract class InputFormatter : Microsoft.AspNetCore.Mvc.ApiExplorer.IApiRequestFormatMetadataProvider, Microsoft.AspNetCore.Mvc.Formatters.IInputFormatter
type InputFormatter = class
    interface IInputFormatter
    interface IApiRequestFormatMetadataProvider
type InputFormatter = class
    interface IApiRequestFormatMetadataProvider
    interface IInputFormatter
Public MustInherit Class InputFormatter
Implements IApiRequestFormatMetadataProvider, IInputFormatter
Devralma
InputFormatter
Türetilmiş
Uygulamalar

Oluşturucular

InputFormatter()

İstek gövdesinden bir nesneyi okur.

Özellikler

SupportedMediaTypes

Bu InputFormattertarafından desteklenen medya türü öğelerinin değiştirilebilir koleksiyonunu alır.

Yöntemler

CanRead(InputFormatterContext)

Bunun IInputFormatter ' ın ModelTypenesnesinin seri durumdan contextçıkarılıp çıkarılamayacağını belirler.

CanReadType(Type)

Bunun InputFormatter verilen typenesnesinin seri durumdan çıkarılıp seri durumdan çıkarılamayacağını belirler.

GetDefaultValueForType(Type)

Belirli bir tür için varsayılan değeri alır. Gövde içerik içermediğinde varsayılan bir değer döndürmek için kullanılır.

GetSupportedContentTypes(String, Type)

ve contentTypeiçin tarafından IInputFormatter desteklenen filtrelenmiş içerik türlerinin objectType listesini alır.

ReadAsync(InputFormatterContext)

İstek gövdesinden bir nesneyi okur.

ReadRequestBodyAsync(InputFormatterContext)

İstek gövdesinden bir nesneyi okur.

Şunlara uygulanır