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.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
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