WriterEvent Type
Represents a single event emitted during the code formatting process. The sequence of writer events captures how the formatter produces its output.
Union cases
| Union case |
Description
|
Full Usage:
IndentBy indent
Parameters:
int
|
Increase indentation by the given number of spaces. Takes effect on the next newline.
|
Full Usage:
NodeEnd(endNodeType, endRange)
Parameters:
string
endRange : string
|
Diagnostic marker: end of an Oak node. Only emitted when DebugMode is enabled.
|
Full Usage:
NodeStart(nodeType, range)
Parameters:
string
range : string
|
Diagnostic marker: beginning of an Oak node. Only emitted when DebugMode is enabled.
|
Full Usage:
Placeholder
|
Placeholder separator between items in a colWithNlnWhenItemIsMultiline block. After all items are emitted, each Placeholder is inspected to determine if the item that follows it was multiline, and then replaced with the appropriate separator. No-op during WriterModel.update and dump. |
Full Usage:
RestoreAtColumn restoreAtColumn
Parameters:
int
|
Restore AtColumn to a previously saved value.
|
Full Usage:
RestoreIndent restoreIndent
Parameters:
int
|
Restore indentation to a previously saved value.
|
Full Usage:
SetAtColumn setAtColumn
Parameters:
int
|
Set the AtColumn value — the minimum indentation floor for subsequent newlines.
|
Full Usage:
SetIndent setIndent
Parameters:
int
|
Set indentation to an absolute column position.
|
Full Usage:
Start
|
Marks the beginning of a colWithNlnWhenItemIsMultiline block. No-op during WriterModel.update and dump — used only as a DLL position marker. |
Full Usage:
UnIndentBy unindent
Parameters:
int
|
Decrease indentation by the given number of spaces.
|
Full Usage:
Write text
Parameters:
string
|
Append literal text to the current line.
|
Full Usage:
WriteBeforeNewline content
Parameters:
string
|
Queue text to be appended just before the next newline (e.g. trailing line comments).
|
Full Usage:
WriteLine
|
End the current line and start a new one at the current indentation level. |
Full Usage:
WriteLineBecauseOfTrivia
|
Newline introduced by trivia (comments, directives) rather than by the formatter itself. Distinguished from WriteLine so colWithNlnWhenItemIsMultiline can ignore trivia-induced newlines. |
Full Usage:
WriteLineInsideStringConst
|
Newline inside a multiline string constant — no indentation is applied. |
Full Usage:
WriteLineInsideTrivia
|
Newline inside a trivia block (e.g. inside a block comment or directive). |
Full Usage:
WriteTrivia trivia
Parameters:
string
|
Emit text that originated from trivia (comments, XML doc lines, or compiler directives). Behaves identically to Write in dump output, but allows the formatting engine to recognise trivia events without fragile string-prefix checks (e.g. "starts with //").
|
Instance members
| Instance member |
Description
|
Full Usage:
this.IsIndentBy
Returns: bool
|
|
Full Usage:
this.IsNodeEnd
Returns: bool
|
|
Full Usage:
this.IsNodeStart
Returns: bool
|
|
Full Usage:
this.IsPlaceholder
Returns: bool
|
|
Full Usage:
this.IsRestoreAtColumn
Returns: bool
|
|
Full Usage:
this.IsRestoreIndent
Returns: bool
|
|
Full Usage:
this.IsSetAtColumn
Returns: bool
|
|
Full Usage:
this.IsSetIndent
Returns: bool
|
|
Full Usage:
this.IsStart
Returns: bool
|
|
Full Usage:
this.IsUnIndentBy
Returns: bool
|
|
Full Usage:
this.IsWrite
Returns: bool
|
|
Full Usage:
this.IsWriteBeforeNewline
Returns: bool
|
|
Full Usage:
this.IsWriteLine
Returns: bool
|
|
Full Usage:
this.IsWriteLineBecauseOfTrivia
Returns: bool
|
|
Full Usage:
this.IsWriteLineInsideStringConst
Returns: bool
|
|
Full Usage:
this.IsWriteLineInsideTrivia
Returns: bool
|
|
Full Usage:
this.IsWriteTrivia
Returns: bool
|
|
fantomas