Rediger

Del via


IndentedTextWriter.WriteAsync Method

Definition

Overloads

WriteAsync(Char[], Int32, Int32)

Asynchronously writes the specified number of Chars from the specified buffer to the underlying TextWriter, starting at the specified index, and outputting tabs at the start of every new line.

WriteAsync(StringBuilder, CancellationToken)

Asynchronously writes the contents of the specified StringBuilder to the underlying TextWriter, inserting tabs at the start of every line.

WriteAsync(Char)

Asynchronously writes the specified Char to the underlying TextWriter, inserting tabs at the start of every line.

WriteAsync(String)

Asynchronously writes the specified string to the underlying TextWriter, inserting tabs at the start of every line.

WriteAsync(ReadOnlyMemory<Char>, CancellationToken)

Asynchronously writes the specified characters to the underlying TextWriter, inserting tabs at the start of every line.

WriteAsync(Char[], Int32, Int32)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Asynchronously writes the specified number of Chars from the specified buffer to the underlying TextWriter, starting at the specified index, and outputting tabs at the start of every new line.

public:
 override System::Threading::Tasks::Task ^ WriteAsync(cli::array <char> ^ buffer, int index, int count);
public override System.Threading.Tasks.Task WriteAsync (char[] buffer, int index, int count);
override this.WriteAsync : char[] * int * int -> System.Threading.Tasks.Task
Public Overrides Function WriteAsync (buffer As Char(), index As Integer, count As Integer) As Task

Parameters

buffer
Char[]

The array to write from.

index
Int32

Index in the array to stort writing at.

count
Int32

The number of characters to write.

Returns

A Task representing the asynchronous operation.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Write(Char[], Int32, Int32).

Applies to

WriteAsync(StringBuilder, CancellationToken)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Asynchronously writes the contents of the specified StringBuilder to the underlying TextWriter, inserting tabs at the start of every line.

public override System.Threading.Tasks.Task WriteAsync (System.Text.StringBuilder? value, System.Threading.CancellationToken cancellationToken = default);
override this.WriteAsync : System.Text.StringBuilder * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overrides Function WriteAsync (value As StringBuilder, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

value
StringBuilder

The text to write.

cancellationToken
CancellationToken

Token for canceling the operation.

Returns

A Task representing the asynchronous operation.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Applies to

WriteAsync(Char)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Asynchronously writes the specified Char to the underlying TextWriter, inserting tabs at the start of every line.

public:
 override System::Threading::Tasks::Task ^ WriteAsync(char value);
public override System.Threading.Tasks.Task WriteAsync (char value);
override this.WriteAsync : char -> System.Threading.Tasks.Task
Public Overrides Function WriteAsync (value As Char) As Task

Parameters

value
Char

The Char to write.

Returns

A Task representing the asynchronous operation.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Write(Char).

Applies to

WriteAsync(String)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Asynchronously writes the specified string to the underlying TextWriter, inserting tabs at the start of every line.

public:
 override System::Threading::Tasks::Task ^ WriteAsync(System::String ^ value);
public override System.Threading.Tasks.Task WriteAsync (string? value);
override this.WriteAsync : string -> System.Threading.Tasks.Task
Public Overrides Function WriteAsync (value As String) As Task

Parameters

value
String

The string to write.

Returns

A Task representing the asynchronous operation.

Remarks

This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as ArgumentException, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by Write(String).

Applies to

WriteAsync(ReadOnlyMemory<Char>, CancellationToken)

Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs
Source:
IndentedTextWriter.cs

Asynchronously writes the specified characters to the underlying TextWriter, inserting tabs at the start of every line.

public override System.Threading.Tasks.Task WriteAsync (ReadOnlyMemory<char> buffer, System.Threading.CancellationToken cancellationToken = default);
override this.WriteAsync : ReadOnlyMemory<char> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overrides Function WriteAsync (buffer As ReadOnlyMemory(Of Char), Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

buffer
ReadOnlyMemory<Char>

The characters to write.

cancellationToken
CancellationToken

Token for canceling the operation.

Returns

A Task representing the asynchronous operation.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Applies to