TextInputFormatter 類別

定義

從具有文字格式的要求本文讀取 物件。

public ref class TextInputFormatter abstract : Microsoft::AspNetCore::Mvc::Formatters::InputFormatter
public abstract class TextInputFormatter : Microsoft.AspNetCore.Mvc.Formatters.InputFormatter
type TextInputFormatter = class
    inherit InputFormatter
Public MustInherit Class TextInputFormatter
Inherits InputFormatter
繼承
TextInputFormatter
衍生

建構函式

TextInputFormatter()

從具有文字格式的要求本文讀取 物件。

欄位

UTF16EncodingLittleEndian

傳回 UTF16 編碼,其使用 littleEndian 位元組順序搭配 BOM,並在不正確位元組上擲回。

UTF8EncodingWithoutBOM

傳回不含 BOM 的 UTF8 編碼,並在不正確位元組上擲回。

屬性

SupportedEncodings

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

SupportedMediaTypes

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

(繼承來源 InputFormatter)

方法

CanRead(InputFormatterContext)

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

(繼承來源 InputFormatter)
CanReadType(Type)

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

(繼承來源 InputFormatter)
GetDefaultValueForType(Type)

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

(繼承來源 InputFormatter)
GetSupportedContentTypes(String, Type)

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

(繼承來源 InputFormatter)
ReadAsync(InputFormatterContext)

從要求本文讀取 物件。

(繼承來源 InputFormatter)
ReadRequestBodyAsync(InputFormatterContext)

從要求本文讀取 物件。

ReadRequestBodyAsync(InputFormatterContext, Encoding)

從要求本文讀取 物件。

SelectCharacterEncoding(InputFormatterContext)

Encoding根據 context 的字元集傳回 。

適用於