Class TextSectionBuilder
Builds text sections with a fluent API. 提供文字區段的 Fluent 建立 API。
public sealed class TextSectionBuilder
- Inheritance
-
TextSectionBuilder
- Inherited Members
Methods
AddHeading(string)
Short overload of AddHeading that accepts text; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 text;其餘可選參數使用預設值並轉呼叫最長 AddHeading 多載。
public TextSectionBuilder AddHeading(string text)
Parameters
textstring
Returns
AddHeading(string, int)
Adds a heading within the section. 新增區段內標題。
public TextSectionBuilder AddHeading(string text, int level)
Parameters
Returns
- TextSectionBuilder
The current builder instance. / 目前 builder 執行個體。
AddParagraph(Action<TextParagraphBuilder>)
Adds a paragraph within the section, composed of multiple text runs. 新增由多個文字片段組成的區段內段落。
public TextSectionBuilder AddParagraph(Action<TextParagraphBuilder> configure)
Parameters
configureAction<TextParagraphBuilder>The paragraph content configuration delegate. / 段落內容設定委派。
Returns
- TextSectionBuilder
The current builder instance. / 目前 builder 執行個體。
AddParagraph(string)
Adds a paragraph within the section. 新增區段內段落。
public TextSectionBuilder AddParagraph(string text)
Parameters
textstringThe paragraph text. / 段落文字。
Returns
- TextSectionBuilder
The current builder instance. / 目前 builder 執行個體。
Protected()
Short overload of Protected that uses default values for all optional parameters and forwards to the full overload. 便利多載:Protected 的所有可選參數使用預設值並轉呼叫最長多載。
public TextSectionBuilder Protected()
Returns
Protected(bool)
Sets whether the section is read-only. 設定區段是否唯讀。
public TextSectionBuilder Protected(bool isProtected)
Parameters
isProtectedboolWhether it is read-only. / 是否唯讀。
Returns
- TextSectionBuilder
The current builder instance. / 目前 builder 執行個體。