public Task FlushAsync(
bool insertNewLine,
CancellationToken cancellationToken = default
)
Public Function FlushAsync (
insertNewLine As Boolean,
Optional cancellationToken As CancellationToken = Nothing
) As Task
Dim instance As LineWrappingTextWriter
Dim insertNewLine As Boolean
Dim cancellationToken As CancellationToken
Dim returnValue As Task
returnValue = instance.FlushAsync(insertNewLine,
cancellationToken)
public:
Task^ FlushAsync(
bool insertNewLine,
CancellationToken cancellationToken = CancellationToken()
)
If insertNewLine is set to , the LineWrappingTextWriter class will not know the length of the flushed line, and therefore the current line may not be correctly wrapped if more text is written to the LineWrappingTextWriter.
For this reason, it's recommended to only set insertNewLine to if you are done writing to this instance.
Indentation is reset by this method, so the next write after calling flush will not be indented.
The FlushAsync method is equivalent to calling this method with insertNewLine set to .