共用方式為


MetadataFormattingOptionsBuilder 類別

定義

提供建置元數據串行化期間所使用的一組格式化選項的功能。

public sealed class MetadataFormattingOptionsBuilder
type MetadataFormattingOptionsBuilder = class
Public NotInheritable Class MetadataFormattingOptionsBuilder
繼承
MetadataFormattingOptionsBuilder

建構函式

MetadataFormattingOptionsBuilder(MetadataFormattingOptions)

建立由指定選項初始化之 MetadataFormattingOptionsBuilder 類別的實例。

MetadataFormattingOptionsBuilder(MetadataSerializationStyle)

根據指定的樣式,建立 MetadataFormattingOptionsBuilder 類別的實例。

屬性

Encoding

取得元數據內容串行化中使用的編碼方式。

IndentationMode

取得元數據內容串行化中的縮排模式。

IndentationSize

取得單一縮排層級的大小,當空格當做元數據內容串行化中的縮排使用時。

NewLineStyle

取得值,這個值用來指出元數據內容串行化中文字行的結尾。

方法

GetOptions()

取得使用所選取格式選項初始化 MetadataFormattingOptions 的實例。

WithEncoding(Encoding)

設定元數據內容串行化中使用的編碼選項。

WithNewLineStyle(NewLineStyle)

在選項上設定元數據內容串行化中文字行結尾的指示。

WithSpacesIndentationMode(Int32)

根據具有指定長度的 Tabs 樣式,設定縮排的選項。

WithTabsIndentationMode()

根據縮排以 Tabs 樣式為基礎的選項設定。

擴充方法

GetBaseIndentationLevel(MetadataFormattingOptionsBuilder)

取得 TMDL 檔的基底縮排層級。

GetCasingStyle(MetadataFormattingOptionsBuilder)

取得關鍵詞寫入 TMDL 文字的大小寫樣式。

WithBaseIndentationLevel(MetadataFormattingOptionsBuilder, Int32)

設定 TMDL 檔的基底縮排層級。

WithCasingStyle(MetadataFormattingOptionsBuilder, TmdlCasingStyle)

設定關鍵詞寫入 TMDL 文字的大小寫樣式。

適用於