共用方式為


XmlSerializerInputFormatter 類別

定義

這個類別會使用 將輸入 XML 資料還原序列化為強型別物件 XmlSerializer

public ref class XmlSerializerInputFormatter : Microsoft::AspNetCore::Mvc::Formatters::TextInputFormatter
public ref class XmlSerializerInputFormatter : Microsoft::AspNetCore::Mvc::Formatters::TextInputFormatter, Microsoft::AspNetCore::Mvc::Formatters::IInputFormatterExceptionPolicy
public class XmlSerializerInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextInputFormatter
public class XmlSerializerInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.TextInputFormatter, Microsoft.AspNetCore.Mvc.Formatters.IInputFormatterExceptionPolicy
type XmlSerializerInputFormatter = class
    inherit TextInputFormatter
type XmlSerializerInputFormatter = class
    inherit TextInputFormatter
    interface IInputFormatterExceptionPolicy
Public Class XmlSerializerInputFormatter
Inherits TextInputFormatter
Public Class XmlSerializerInputFormatter
Inherits TextInputFormatter
Implements IInputFormatterExceptionPolicy
繼承
XmlSerializerInputFormatter
實作

建構函式

XmlSerializerInputFormatter()
已淘汰.

初始化 XmlSerializerInputFormatter 的新實例。

XmlSerializerInputFormatter(Boolean)
已淘汰.

初始化 XmlSerializerInputFormatter 的新執行個體。

XmlSerializerInputFormatter(MvcOptions)

初始化 XmlSerializerInputFormatter 的新執行個體。

屬性

ExceptionPolicy

取得旗標,指出主體模型系結器是否應該處理所有例外狀況。 如果處理例外狀況,主體模型系結器會將例外狀況轉換成模型狀態錯誤,否則允許傳播例外狀況。

MaxDepth

表示可接受的輸入 XML 深度。

SupportedEncodings

取得這個 TextInputFormatter 所支援之字元編碼的可變動集合。 讀取資料時會使用編碼方式。

(繼承來源 TextInputFormatter)
SupportedMediaTypes

取得這個 InputFormatter 所支援之媒體類型專案的可變動集合。

(繼承來源 InputFormatter)
WrapperProviderFactories

取得 的清單 IWrapperProviderFactory ,以提供取消序列化的包裝類型。

XmlDictionaryReaderQuotas

配額包括 - DefaultMaxDepth、DefaultMaxStringContentLength、DefaultMaxArrayLength、DefaultMaxBytesPerRead、DefaultMaxNameTableCharCount

方法

CanRead(InputFormatterContext)

判斷這 IInputFormatter 是否可以還原序列化 的 ModelType 物件 context

(繼承來源 InputFormatter)
CanReadType(Type)

判斷這 InputFormatter 是否可以還原序列化指定 type 的物件。

CreateSerializer(Type)

在還原序列化期間呼叫 以取得 XmlSerializer

CreateXmlReader(Stream, Encoding)

在還原序列化期間呼叫 以取得 XmlReader

CreateXmlReader(Stream, Encoding, Type)

在還原序列化期間呼叫 以取得 XmlReader

GetCachedSerializer(Type)

取得快取的序列化程式,或建立並快取指定類型的序列化程式。

GetDefaultValueForType(Type)

取得指定型別的預設值。 當本文不包含任何內容時,用來傳回預設值。

(繼承來源 InputFormatter)
GetSerializableType(Type)

取得 XML 將還原序列化的型別。

GetSupportedContentTypes(String, Type)

取得 和 支援的內容類型 IInputFormatterobjectTypecontentType 篩選清單。

(繼承來源 InputFormatter)
ReadAsync(InputFormatterContext)

從要求本文讀取 物件。

(繼承來源 InputFormatter)
ReadRequestBodyAsync(InputFormatterContext)

從要求本文讀取 物件。

(繼承來源 TextInputFormatter)
ReadRequestBodyAsync(InputFormatterContext, Encoding)

從要求本文讀取 物件。

SelectCharacterEncoding(InputFormatterContext)

Encoding根據 context 的字元集傳回 。

(繼承來源 TextInputFormatter)

適用於