LineWrappingTextWriterResetIndentAsync Method

Restarts writing on the beginning of the line, without indenting that line.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public Task ResetIndentAsync(
	CancellationToken cancellationToken = default
)

Parameters

cancellationToken  CancellationToken  (Optional)
A token that can be used to cancel the operation.

Return Value

Task
A task that represents the asynchronous reset operation.

Remarks

The ResetIndentAsync(CancellationToken) method will reset the output position to the beginning of the current line. It does not modify the Indent property, so the text will be indented again the next time a line break is written to the output.

If the current line buffer is not empty, it will be flushed to the BaseWriter, followed by a new line before the indentation is reset. If the current line buffer is empty (a line containing only indentation is considered empty), the output position is simply reset to the beginning of the line without writing anything to the base writer.

See Also