CommandLineIOExtensionsWriteIndentedAsync - метод
Writes a string to the text string or stream with indentation of every line of the string.
Пространство имён: Tessa.Platform.CommandLineСборка: Tessa (в Tessa.dll) Версия: 4.0.4
public static ValueTask WriteIndentedAsync(
this TextWriter output,
string? value,
int indent,
bool indentFirstLine = true,
CancellationToken cancellationToken = default
)
<ExtensionAttribute>
Public Shared Function WriteIndentedAsync (
output As TextWriter,
value As String,
indent As Integer,
Optional indentFirstLine As Boolean = true,
Optional cancellationToken As CancellationToken = Nothing
) As ValueTask
public:
[ExtensionAttribute]
static ValueTask WriteIndentedAsync(
TextWriter^ output,
String^ value,
int indent,
bool indentFirstLine = true,
CancellationToken cancellationToken = CancellationToken()
)
[<ExtensionAttribute>]
static member WriteIndentedAsync :
output : TextWriter *
value : string *
indent : int *
?indentFirstLine : bool *
?cancellationToken : CancellationToken
(* Defaults:
let _indentFirstLine = defaultArg indentFirstLine true
let _cancellationToken = defaultArg cancellationToken new CancellationToken()
*)
-> ValueTask
- output TextWriter
- A TextWriter that represents an output stream.
- value String
- The string to write.
- indent Int32
- The space count to indent.
- indentFirstLine Boolean (Optional)
- Indent first line.
- cancellationToken CancellationToken (Optional)
- Token to cancel async task.
ValueTaskAsync task.В Visual Basic и C# этот метод можно вызывать как метод экземпляра для любого объекта типа
TextWriter. При вызове метода для экземпляра следует опускать первый параметр. Дополнительные сведения см. в разделе
Методы расширения (Visual Basic) или
Методы расширения (Руководство по программированию в C#).
If value is null, nothing is written to the text stream.
ArgumentNullException | output is null. |
ArgumentOutOfRangeException | indent is less than zero. |