Bagikan melalui


IndentedTextWriter Kelas

Definisi

Menyediakan penulis teks yang dapat mengindentasi baris baru dengan token string tab.

public ref class IndentedTextWriter : System::IO::TextWriter
public class IndentedTextWriter : System.IO.TextWriter
type IndentedTextWriter = class
    inherit TextWriter
Public Class IndentedTextWriter
Inherits TextWriter
Warisan
IndentedTextWriter

Contoh

Contoh kode berikut menunjukkan penggunaan IndentedTextWriter untuk menulis teks pada tingkat indentasi yang berbeda.

#using <System.Drawing.dll>
#using <System.Windows.Forms.dll>
#using <System.dll>

using namespace System;
using namespace System::CodeDom;
using namespace System::CodeDom::Compiler;
using namespace System::ComponentModel;
using namespace System::IO;
using namespace System::Windows::Forms;
public ref class Form1: public System::Windows::Forms::Form
{
private:
   System::Windows::Forms::TextBox^ textBox1;

   String^ CreateMultilevelIndentString()
   {
      
      // Creates a TextWriter to use as the base output writer.
      System::IO::StringWriter^ baseTextWriter = gcnew System::IO::StringWriter;
      
      // Create an IndentedTextWriter and set the tab string to use 
      // as the indentation string for each indentation level.
      System::CodeDom::Compiler::IndentedTextWriter^ indentWriter = gcnew IndentedTextWriter( baseTextWriter,"    " );
      
      // Sets the indentation level.
      indentWriter->Indent = 0;
      
      // Output test strings at stepped indentations through a recursive loop method.
      WriteLevel( indentWriter, 0, 5 );
      
      // Return the resulting string from the base StringWriter.
      return baseTextWriter->ToString();
   }


   void WriteLevel( IndentedTextWriter^ indentWriter, int level, int totalLevels )
   {
      
      // Output a test string with a new-line character at the end.
      indentWriter->WriteLine( "This is a test phrase. Current indentation level: {0}", level );
      
      // If not yet at the highest recursion level, call this output method for the next level of indentation.
      if ( level < totalLevels )
      {
         
         // Increase the indentation count for the next level of indented output.
         indentWriter->Indent++;
         
         // Call the WriteLevel method to write test output for the next level of indentation.
         WriteLevel( indentWriter, level + 1, totalLevels );
         
         // Restores the indentation count for this level after the recursive branch method has returned.
         indentWriter->Indent--;
      }
      else
      // Outputs a string using the WriteLineNoTabs method.
            indentWriter->WriteLineNoTabs( "This is a test phrase written with the IndentTextWriter.WriteLineNoTabs method." );
      // Outputs a test string with a new-line character at the end.
      indentWriter->WriteLine( "This is a test phrase. Current indentation level: {0}", level );
   }


   void button1_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
   {
      textBox1->Text = CreateMultilevelIndentString();
   }


public:
   Form1()
   {
      System::Windows::Forms::Button^ button1 = gcnew System::Windows::Forms::Button;
      this->textBox1 = gcnew System::Windows::Forms::TextBox;
      this->SuspendLayout();
      this->textBox1->Anchor = (System::Windows::Forms::AnchorStyles)(System::Windows::Forms::AnchorStyles::Top | System::Windows::Forms::AnchorStyles::Bottom | System::Windows::Forms::AnchorStyles::Left | System::Windows::Forms::AnchorStyles::Right);
      this->textBox1->Location = System::Drawing::Point( 8, 40 );
      this->textBox1->Multiline = true;
      this->textBox1->Name = "textBox1";
      this->textBox1->Size = System::Drawing::Size( 391, 242 );
      this->textBox1->TabIndex = 0;
      this->textBox1->Text = "";
      button1->Location = System::Drawing::Point( 11, 8 );
      button1->Name = "button1";
      button1->Size = System::Drawing::Size( 229, 23 );
      button1->TabIndex = 1;
      button1->Text = "Generate string using IndentedTextWriter";
      button1->Click += gcnew System::EventHandler( this, &Form1::button1_Click );
      this->AutoScaleBaseSize = System::Drawing::Size( 5, 13 );
      this->ClientSize = System::Drawing::Size( 407, 287 );
      this->Controls->Add( button1 );
      this->Controls->Add( this->textBox1 );
      this->Name = "Form1";
      this->Text = "IndentedTextWriter example";
      this->ResumeLayout( false );
   }

};


[STAThread]
int main()
{
   Application::Run( gcnew Form1 );
}
using System;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.IO;
using System.Windows.Forms;

namespace IndentedTextWriterExample
{
    public class Form1 : System.Windows.Forms.Form
    {
        private System.Windows.Forms.TextBox textBox1;

        private string CreateMultilevelIndentString()
        {
            // Creates a TextWriter to use as the base output writer.
            System.IO.StringWriter baseTextWriter = new System.IO.StringWriter();

            // Create an IndentedTextWriter and set the tab string to use
            // as the indentation string for each indentation level.
            System.CodeDom.Compiler.IndentedTextWriter indentWriter = new IndentedTextWriter(baseTextWriter, "    ");

            // Sets the indentation level.
            indentWriter.Indent = 0;

            // Output test strings at stepped indentations through a recursive loop method.
            WriteLevel(indentWriter, 0, 5);

            // Return the resulting string from the base StringWriter.
            return baseTextWriter.ToString();
        }

        private void WriteLevel(IndentedTextWriter indentWriter, int level, int totalLevels)
        {
            // Output a test string with a new-line character at the end.
            indentWriter.WriteLine("This is a test phrase. Current indentation level: "+level.ToString());

            // If not yet at the highest recursion level, call this output method for the next level of indentation.
            if( level < totalLevels )
            {
                // Increase the indentation count for the next level of indented output.
                indentWriter.Indent++;

                // Call the WriteLevel method to write test output for the next level of indentation.
                WriteLevel(indentWriter, level+1, totalLevels);

                // Restores the indentation count for this level after the recursive branch method has returned.
                indentWriter.Indent--;
            }
            else
            {
                // Outputs a string using the WriteLineNoTabs method.
                indentWriter.WriteLineNoTabs("This is a test phrase written with the IndentTextWriter.WriteLineNoTabs method.");
            }

            // Outputs a test string with a new-line character at the end.
            indentWriter.WriteLine("This is a test phrase. Current indentation level: "+level.ToString());
        }

        private void button1_Click(object sender, System.EventArgs e)
        {
            textBox1.Text = CreateMultilevelIndentString();
        }

        public Form1()
        {
            System.Windows.Forms.Button button1 = new System.Windows.Forms.Button();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.SuspendLayout();
            this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
            this.textBox1.Location = new System.Drawing.Point(8, 40);
            this.textBox1.Multiline = true;
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(391, 242);
            this.textBox1.TabIndex = 0;
            this.textBox1.Text = "";
            button1.Location = new System.Drawing.Point(11, 8);
            button1.Name = "button1";
            button1.Size = new System.Drawing.Size(229, 23);
            button1.TabIndex = 1;
            button1.Text = "Generate string using IndentedTextWriter";
            button1.Click += new System.EventHandler(this.button1_Click);
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(407, 287);
            this.Controls.Add(button1);
            this.Controls.Add(this.textBox1);
            this.Name = "Form1";
            this.Text = "IndentedTextWriter example";
            this.ResumeLayout(false);
        }

        [STAThread]
        static void Main()
        {
            Application.Run(new Form1());
        }
    }
}
Imports System.CodeDom
Imports System.CodeDom.Compiler
Imports System.ComponentModel
Imports System.IO
Imports System.Windows.Forms

Public Class Form1
   Inherits System.Windows.Forms.Form
   Private textBox1 As System.Windows.Forms.TextBox 
   
   Private Function CreateMultilevelIndentString() As String
        ' Create a TextWriter to use as the base output writer.
        Dim baseTextWriter As New System.IO.StringWriter
      
        ' Create an IndentedTextWriter and set the tab string to use 
        ' as the indentation string for each indentation level.
        Dim indentWriter = New IndentedTextWriter(baseTextWriter, "    ")

        ' Set the indentation level.
        indentWriter.Indent = 0

        ' Output test strings at stepped indentations through a recursive loop method.
        WriteLevel(indentWriter, 0, 5)
      
        ' Return the resulting string from the base StringWriter.
        Return baseTextWriter.ToString()
    End Function

    Private Sub WriteLevel(ByVal indentWriter As IndentedTextWriter, ByVal level As Integer, ByVal totalLevels As Integer)
        ' Outputs a test string with a new-line character at the end.
        indentWriter.WriteLine(("This is a test phrase. Current indentation level: " + level.ToString()))

        ' If not yet at the highest recursion level, call this output method for the next level of indentation.
        If level < totalLevels Then
            ' Increase the indentation count for the next level of indented output.
            indentWriter.Indent += 1

            ' Call the WriteLevel method to write test output for the next level of indentation.
            WriteLevel(indentWriter, level + 1, totalLevels)

            ' Restores the indentation count for this level after the recursive branch method has returned.
            indentWriter.Indent -= 1

        Else
            ' Output a string using the WriteLineNoTabs method.
            indentWriter.WriteLineNoTabs("This is a test phrase written with the IndentTextWriter.WriteLineNoTabs method.")
        End If

        ' Outputs a test string with a new-line character at the end.
        indentWriter.WriteLine(("This is a test phrase. Current indentation level: " + level.ToString()))
    End Sub

    Private Sub button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        textBox1.Text = CreateMultilevelIndentString()
    End Sub

    Public Sub New()
        Dim button1 As New System.Windows.Forms.Button
        Me.textBox1 = New System.Windows.Forms.TextBox
        Me.SuspendLayout()
        Me.textBox1.Anchor = CType(System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right, System.Windows.Forms.AnchorStyles)
        Me.textBox1.Location = New System.Drawing.Point(8, 40)
        Me.textBox1.Multiline = True
        Me.textBox1.Name = "textBox1"
        Me.textBox1.Size = New System.Drawing.Size(391, 242)
        Me.textBox1.TabIndex = 0
        Me.textBox1.Text = ""
        button1.Location = New System.Drawing.Point(11, 8)
        button1.Name = "button1"
        button1.Size = New System.Drawing.Size(229, 23)
        button1.TabIndex = 1
        button1.Text = "Generate string using IndentedTextWriter"
        AddHandler button1.Click, AddressOf Me.button1_Click
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(407, 287)
        Me.Controls.Add(button1)
        Me.Controls.Add(Me.textBox1)
        Me.Name = "Form1"
        Me.Text = "IndentedTextWriter example"
        Me.ResumeLayout(False)
    End Sub

    <STAThread()> _
    Shared Sub Main()
        Application.Run(New Form1)
    End Sub
End Class

Keterangan

IndentedTextWriter memperluas TextWriter dengan menyediakan metode yang menyisipkan string tab dan melacak tingkat indentasi saat ini. Teks yang diformat dengan beberapa tingkat indentasi berguna untuk kode yang dihasilkan, sehingga kelas ini digunakan oleh implementasi generator kode CodeDOM.

String tab adalah string yang terdiri dari setiap indentasi. Biasanya string tab berisi spasi kosong.

Nota

Kelas ini berisi permintaan tautan dan permintaan warisan di tingkat kelas yang berlaku untuk semua anggota. SecurityException dilemparkan ketika pemanggil langsung atau kelas turunan tidak memiliki izin kepercayaan penuh. Untuk detail tentang tuntutan keamanan, lihat Permintaan Tautan dan Permintaan Warisan .

Konstruktor

IndentedTextWriter(TextWriter)

Menginisialisasi instans baru kelas IndentedTextWriter menggunakan penulis teks yang ditentukan dan string tab default.

IndentedTextWriter(TextWriter, String)

Menginisialisasi instans baru kelas IndentedTextWriter menggunakan penulis teks dan string tab yang ditentukan.

Bidang

CoreNewLine

Menyimpan karakter baris baru yang digunakan untuk TextWriterini.

(Diperoleh dari TextWriter)
DefaultTabString

Menentukan string tab default. Bidang ini konstan.

Properti

Encoding

Mendapatkan pengodean untuk digunakan penulis teks.

FormatProvider

Mendapatkan objek yang mengontrol pemformatan.

(Diperoleh dari TextWriter)
Indent

Mendapatkan atau mengatur jumlah spasi ke inden.

InnerWriter

Mendapatkan TextWriter untuk digunakan.

NewLine

Mendapatkan atau mengatur karakter baris baru untuk digunakan.

Metode

Close()

Menutup dokumen yang sedang ditulis.

CreateObjRef(Type)

Membuat objek yang berisi semua informasi relevan yang diperlukan untuk menghasilkan proksi yang digunakan untuk berkomunikasi dengan objek jarak jauh.

(Diperoleh dari MarshalByRefObject)
Dispose()

Merilis semua sumber daya yang digunakan oleh objek TextWriter.

(Diperoleh dari TextWriter)
Dispose(Boolean)

Merilis sumber daya yang tidak dikelola yang digunakan oleh TextWriter dan secara opsional merilis sumber daya terkelola.

(Diperoleh dari TextWriter)
DisposeAsync()

Melakukan tugas yang ditentukan aplikasi yang terkait dengan membebaskan, merilis, atau mengatur ulang sumber daya yang tidak dikelola secara asinkron.

DisposeAsync()

Secara asinkron merilis semua sumber daya yang digunakan oleh objek TextWriter.

(Diperoleh dari TextWriter)
Equals(Object)

Menentukan apakah objek yang ditentukan sama dengan objek saat ini.

(Diperoleh dari Object)
Flush()

Bersihkan aliran.

FlushAsync()

Menghapus semua buffer untuk IndentedTextWriter ini secara asinkron dan menyebabkan data yang di-buffer ditulis ke perangkat yang mendasar.

FlushAsync()

Secara asinkron menghapus semua buffer untuk penulis saat ini dan menyebabkan data buffer ditulis ke perangkat yang mendasar.

(Diperoleh dari TextWriter)
FlushAsync(CancellationToken)

Menghapus semua buffer untuk IndentedTextWriter ini secara asinkron dan menyebabkan data yang di-buffer ditulis ke perangkat yang mendasar.

FlushAsync(CancellationToken)

Secara asinkron menghapus semua buffer untuk penulis saat ini dan menyebabkan data buffer ditulis ke perangkat yang mendasar.

(Diperoleh dari TextWriter)
GetHashCode()

Berfungsi sebagai fungsi hash default.

(Diperoleh dari Object)
GetLifetimeService()
Kedaluwarsa.

Mengambil objek layanan seumur hidup saat ini yang mengontrol kebijakan seumur hidup untuk instans ini.

(Diperoleh dari MarshalByRefObject)
GetType()

Mendapatkan Type instans saat ini.

(Diperoleh dari Object)
InitializeLifetimeService()
Kedaluwarsa.

Mendapatkan objek layanan seumur hidup untuk mengontrol kebijakan seumur hidup untuk instans ini.

(Diperoleh dari MarshalByRefObject)
MemberwiseClone()

Membuat salinan dangkal dari Objectsaat ini.

(Diperoleh dari Object)
MemberwiseClone(Boolean)

Membuat salinan dangkal objek MarshalByRefObject saat ini.

(Diperoleh dari MarshalByRefObject)
OutputTabs()

Menghasilkan string tab sekali untuk setiap tingkat indentasi sesuai dengan properti Indent.

OutputTabsAsync()

Secara asinkron menghasilkan tab ke TextWriter yang mendasar berdasarkan Indentsaat ini.

ToString()

Mengembalikan string yang mewakili objek saat ini.

(Diperoleh dari Object)
Write(Boolean)

Menulis representasi teks dari nilai Boolean ke aliran teks.

Write(Char)

Menulis karakter ke aliran teks.

Write(Char[])

Menulis array karakter ke aliran teks.

Write(Char[], Int32, Int32)

Menulis subarray karakter ke aliran teks.

Write(Decimal)

Menulis representasi teks dari nilai desimal ke aliran teks.

(Diperoleh dari TextWriter)
Write(Double)

Menulis representasi teks dari Double ke aliran teks.

Write(Int32)

Menulis representasi teks bilangan bulat ke aliran teks.

Write(Int64)

Menulis representasi teks bilangan bulat 8-byte ke aliran teks.

Write(Object)

Menulis representasi teks objek ke aliran teks.

Write(ReadOnlySpan<Char>)

Menulis rentang karakter ke aliran teks.

(Diperoleh dari TextWriter)
Write(Single)

Menulis representasi teks dari Satu ke aliran teks.

Write(String)

Menulis string yang ditentukan ke aliran teks.

Write(String, Object)

Menulis string yang diformat, menggunakan semantik yang sama seperti yang ditentukan.

Write(String, Object, Object)

Menulis string yang diformat, menggunakan semantik yang sama seperti yang ditentukan.

Write(String, Object, Object, Object)

Menulis string yang diformat ke aliran teks, menggunakan semantik yang sama dengan metode Format(String, Object, Object, Object).

(Diperoleh dari TextWriter)
Write(String, Object[])

Menulis string yang diformat, menggunakan semantik yang sama seperti yang ditentukan.

Write(String, ReadOnlySpan<Object>)

Menulis string yang diformat, menggunakan semantik yang sama seperti yang ditentukan.

Write(String, ReadOnlySpan<Object>)

Menulis string yang diformat ke aliran teks, menggunakan semantik yang sama dengan Format(String, ReadOnlySpan<Object>).

(Diperoleh dari TextWriter)
Write(StringBuilder)

Menulis pembangun string ke aliran teks.

(Diperoleh dari TextWriter)
Write(UInt32)

Menulis representasi teks dari bilangan bulat yang tidak ditandatangani 4-byte ke aliran teks.

(Diperoleh dari TextWriter)
Write(UInt64)

Menulis representasi teks dari bilangan bulat yang tidak ditandatangani 8-byte ke aliran teks.

(Diperoleh dari TextWriter)
WriteAsync(Char)

Secara asinkron menulis Char yang ditentukan ke TextWriteryang mendasar , menyisipkan tab di awal setiap baris.

WriteAsync(Char)

Menulis karakter ke aliran teks secara asinkron.

(Diperoleh dari TextWriter)
WriteAsync(Char[])

Menulis array karakter ke aliran teks secara asinkron.

(Diperoleh dari TextWriter)
WriteAsync(Char[], Int32, Int32)

Secara asinkron menulis jumlah Charyang ditentukan dari buffer yang ditentukan ke TextWriteryang mendasar , mulai dari indeks yang ditentukan, dan menghasilkan tab di awal setiap baris baru.

WriteAsync(Char[], Int32, Int32)

Menulis subarray karakter ke aliran teks secara asinkron.

(Diperoleh dari TextWriter)
WriteAsync(ReadOnlyMemory<Char>, CancellationToken)

Secara asinkron menulis karakter yang ditentukan ke TextWriteryang mendasar , menyisipkan tab di awal setiap baris.

WriteAsync(ReadOnlyMemory<Char>, CancellationToken)

Menulis wilayah memori karakter secara asinkron ke aliran teks.

(Diperoleh dari TextWriter)
WriteAsync(String)

Secara asinkron menulis string yang ditentukan ke TextWriteryang mendasar , menyisipkan tab di awal setiap baris.

WriteAsync(String)

Menulis string ke aliran teks secara asinkron.

(Diperoleh dari TextWriter)
WriteAsync(StringBuilder, CancellationToken)

Secara asinkron menulis konten StringBuilder yang ditentukan ke TextWriteryang mendasar , menyisipkan tab di awal setiap baris.

WriteAsync(StringBuilder, CancellationToken)

Menulis pembangun string secara asinkron ke aliran teks.

(Diperoleh dari TextWriter)
WriteLine()

Menulis terminator baris.

WriteLine(Boolean)

Menulis representasi teks Boolean, diikuti oleh terminator baris, ke aliran teks.

WriteLine(Char)

Menulis karakter, diikuti oleh terminator baris, ke aliran teks.

WriteLine(Char[])

Menulis array karakter, diikuti dengan terminator baris, ke aliran teks.

WriteLine(Char[], Int32, Int32)

Menulis subarray karakter, diikuti oleh terminator baris, ke aliran teks.

WriteLine(Decimal)

Menulis representasi teks dari nilai desimal ke aliran teks, diikuti oleh terminator baris.

(Diperoleh dari TextWriter)
WriteLine(Double)

Menulis representasi teks dari Double, diikuti oleh terminator baris, ke aliran teks.

WriteLine(Int32)

Menulis representasi teks bilangan bulat, diikuti oleh terminator baris, ke aliran teks.

WriteLine(Int64)

Menulis representasi teks bilangan bulat 8-byte, diikuti oleh terminator baris, ke aliran teks.

WriteLine(Object)

Menulis representasi teks objek, diikuti oleh terminator baris, ke aliran teks.

WriteLine(ReadOnlySpan<Char>)

Menulis representasi teks dari rentang karakter ke aliran teks, diikuti oleh terminator baris.

(Diperoleh dari TextWriter)
WriteLine(Single)

Menulis representasi teks dari Tunggal, diikuti oleh terminator baris, ke aliran teks.

WriteLine(String)

Menulis string yang ditentukan, diikuti oleh terminator baris, ke aliran teks.

WriteLine(String, Object)

Menulis string yang diformat, diikuti oleh terminator baris, menggunakan semantik yang sama seperti yang ditentukan.

WriteLine(String, Object, Object)

Menulis string yang diformat, diikuti oleh terminator baris, menggunakan semantik yang sama seperti yang ditentukan.

WriteLine(String, Object, Object, Object)

Menulis string yang diformat dan baris baru ke aliran teks, menggunakan semantik yang sama dengan Format(String, Object).

(Diperoleh dari TextWriter)
WriteLine(String, Object[])

Menulis string yang diformat, diikuti oleh terminator baris, menggunakan semantik yang sama seperti yang ditentukan.

WriteLine(String, ReadOnlySpan<Object>)

Menulis string yang diformat, diikuti oleh terminator baris, menggunakan semantik yang sama seperti yang ditentukan.

WriteLine(String, ReadOnlySpan<Object>)

Menulis string yang diformat dan baris baru ke aliran teks, menggunakan semantik yang sama dengan Format(String, ReadOnlySpan<Object>).

(Diperoleh dari TextWriter)
WriteLine(StringBuilder)

Menulis representasi teks penyusun string ke aliran teks, diikuti oleh terminator baris.

(Diperoleh dari TextWriter)
WriteLine(UInt32)

Menulis representasi teks UInt32, diikuti oleh terminator baris, ke aliran teks.

WriteLine(UInt64)

Menulis representasi teks dari bilangan bulat yang tidak ditandatangani 8 byte ke aliran teks, diikuti oleh terminator baris.

(Diperoleh dari TextWriter)
WriteLineAsync()

Secara asinkron menulis terminator baris ke TextWriteryang mendasar .

WriteLineAsync()

Menulis terminator baris secara asinkron ke aliran teks.

(Diperoleh dari TextWriter)
WriteLineAsync(Char)

Secara asinkron menulis Char yang ditentukan ke TextWriter yang mendasar diikuti oleh terminator baris, menyisipkan tab di awal setiap baris.

WriteLineAsync(Char)

Secara asinkron menulis karakter ke aliran teks, diikuti oleh terminator garis.

(Diperoleh dari TextWriter)
WriteLineAsync(Char[])

Secara asinkron menulis array karakter ke aliran teks, diikuti oleh terminator baris.

(Diperoleh dari TextWriter)
WriteLineAsync(Char[], Int32, Int32)

Secara asinkron menulis jumlah karakter yang ditentukan dari buffer yang ditentukan diikuti oleh terminator baris, ke TextWriteryang mendasar , dimulai pada indeks yang ditentukan dalam buffer, menyisipkan tab di awal setiap baris.

WriteLineAsync(Char[], Int32, Int32)

Secara asinkron menulis subarray karakter ke aliran teks, diikuti oleh terminator baris.

(Diperoleh dari TextWriter)
WriteLineAsync(ReadOnlyMemory<Char>, CancellationToken)

Secara asinkron menulis karakter yang ditentukan diikuti oleh terminator baris ke TextWriteryang mendasar , menyisipkan tab di awal setiap baris.

WriteLineAsync(ReadOnlyMemory<Char>, CancellationToken)

Secara asinkron menulis representasi teks wilayah memori karakter ke aliran teks, diikuti oleh terminator baris.

(Diperoleh dari TextWriter)
WriteLineAsync(String)

Secara asinkron menulis string yang ditentukan diikuti oleh terminator baris ke TextWriteryang mendasar , menyisipkan tab di awal setiap baris.

WriteLineAsync(String)

Secara asinkron menulis string ke aliran teks, diikuti oleh terminator baris.

(Diperoleh dari TextWriter)
WriteLineAsync(StringBuilder, CancellationToken)

Secara asinkron menulis konten StringBuilder yang ditentukan diikuti oleh terminator baris ke TextWriteryang mendasar , menyisipkan tab di awal setiap baris.

WriteLineAsync(StringBuilder, CancellationToken)

Secara asinkron menulis representasi teks pembangun string ke aliran teks, diikuti oleh terminator baris.

(Diperoleh dari TextWriter)
WriteLineNoTabs(String)

Menulis string yang ditentukan ke baris tanpa tab.

WriteLineNoTabsAsync(String)

Secara asinkron menulis string yang ditentukan ke TextWriter yang mendasar tanpa menyisipkan tab.

Implementasi Antarmuka Eksplisit

IDisposable.Dispose()

Untuk deskripsi anggota ini, lihat Dispose().

(Diperoleh dari TextWriter)

Metode Ekstensi

ConfigureAwait(IAsyncDisposable, Boolean)

Mengonfigurasi bagaimana menunggu tugas yang dikembalikan dari asinkron sekali pakai akan dilakukan.

Berlaku untuk