TextRendererBase<T> Class
Typed TextRendererBase.
public abstract class TextRendererBase<T> : TextRendererBase where T : TextRendererBase<T>- Inheritance
TextRendererBaseTextRendererBase<T>
Constructors
| Name | Description |
|---|---|
| TextRendererBase(TextWriter) | Initializes a new instance of the TextRendererBase<T> class. |
TextRendererBase(TextWriter)
TextRendererBase.csInitializes a new instance of the TextRendererBase<T> class.
protected TextRendererBase(TextWriter writer)Parameters
writerTextWriter- The writer.
Methods
| Name | Description |
|---|---|
| ClearIndent() | Performs the clear indent operation. |
| EnsureLine() | Ensures a newline. |
| PopIndent() | Performs the pop indent operation. |
| PushHangingIndent(string) | Pushes an indent that uses the specified marker on its first line and the same number of spaces on subsequent lines. |
| PushIndent(string) | Performs the push indent operation. |
| PushIndent(string[]) | Performs the push indent operation. |
| Reset() | Performs the reset operation. |
| Write(StringSlice) | Writes the specified slice. |
| Write(StringSlice) | Writes the specified slice. |
| Write(char) | Writes the specified character. |
| Write(ReadOnlySpan<char>) | Writes the specified content. |
| Write(string?) | Writes the specified content. |
| Write(string, int, int) | Writes the specified content. |
| WriteLeafInline(LeafBlock) | Writes the inlines of a leaf inline. |
| WriteLine() | Writes a newline. |
| WriteLine(NewLine) | Writes a newline. |
| WriteLine(char) | Writes a content followed by a newline. |
| WriteLine(string) | Writes a content followed by a newline. |
ClearIndent()
TextRendererBase.csPerforms the clear indent operation.
public void ClearIndent()EnsureLine()
TextRendererBase.csEnsures a newline.
public T EnsureLine()Returns
T This instance
PopIndent()
TextRendererBase.csPerforms the pop indent operation.
public void PopIndent()PushHangingIndent(string)
TextRendererBase.csPushes an indent that uses the specified marker on its first line and the same number of spaces on subsequent lines.
Parameters
markerstring- The first line of the hanging indent.
Exceptions
ArgumentNullExceptionmarkeris null.
Remarks
Call at the beginning of a line, before writing child content. This method marks indents as pending but does not insert a newline; use TextRendererBase<T>.EnsureLine first if necessary. The next write emits all active indents, including this marker. Call TextRendererBase<T>.PopIndent after writing the indented content.
PushIndent overloads
PushIndent(string)
TextRendererBase.csPushIndent(string[])
TextRendererBase.csPerforms the push indent operation.
Parameters
lineSpecificstring[]- The indent to use for each successive line.
Exceptions
ArgumentNullExceptionlineSpecificis null.
Reset()
TextRendererBase.csPerforms the reset operation.
protected internal void Reset()Write overloads
Write(StringSlice)
TextRendererBase.csWrites the specified slice.
public T Write(StringSlice slice)Write(StringSlice)
TextRendererBase.csWrites the specified slice.
public T Write(ref StringSlice slice)Write(char)
TextRendererBase.csWrite(ReadOnlySpan<char>)
TextRendererBase.csWrites the specified content.
public void Write(ReadOnlySpan<char> content)Parameters
contentReadOnlySpan<char>- The content.
Write(string?)
TextRendererBase.csWrite(string, int, int)
TextRendererBase.csWriteLeafInline(LeafBlock)
TextRendererBase.csWriteLine overloads
WriteLine()
TextRendererBase.csWrites a newline.
public T WriteLine()Returns
T This instance
WriteLine(NewLine)
TextRendererBase.csWriteLine(char)
TextRendererBase.csWriteLine(string)
TextRendererBase.csFields
| Name | Description |
|---|---|
| PreviousWasLine | Gets or sets the previous was line. |
PreviousWasLine
Gets or sets the previous was line.
protected bool PreviousWasLine