Udostępnij za pośrednictwem


IndentedTextWriter Klasa

Definicja

Udostępnia moduł zapisywania tekstu, który może wciąć nowe wiersze przy użyciu tokenu ciągu tabulatora.

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

Przykłady

W poniższym przykładzie kodu pokazano użycie elementu IndentedTextWriter do pisania tekstu na różnych poziomach wcięcia.

#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

Uwagi

IndentedTextWriter rozszerza metodę TextWriter , która wstawia ciąg tabulacji i śledzi bieżący poziom wcięcia. Tekst sformatowany przy użyciu wielu poziomów wcięcia jest przydatny w przypadku wygenerowanego kodu, więc ta klasa jest używana przez implementacje generatora kodu CodeDOM.

Ciąg tabulatora to ciąg, który składa się z każdego wcięcia. Zazwyczaj ciąg tabulatora zawiera białe znaki.

Uwaga

Ta klasa zawiera żądanie łącza i dziedziczenia na poziomie klasy stosowane do wszystkich składowych. Element jest SecurityException zgłaszany, gdy bezpośredni obiekt wywołujący lub klasa pochodna nie ma uprawnień pełnego zaufania. Aby uzyskać szczegółowe informacje na temat wymagań dotyczących zabezpieczeń, zobacz Łączenie żądań i żądań dziedziczenia.

Konstruktory

IndentedTextWriter(TextWriter)

Inicjuje nowe wystąpienie klasy przy użyciu określonego IndentedTextWriter składnika zapisywania tekstu i domyślnego ciągu tabulatora.

IndentedTextWriter(TextWriter, String)

Inicjuje IndentedTextWriter nowe wystąpienie klasy przy użyciu określonego modułu zapisywania tekstu i ciągu tabulatora.

Pola

CoreNewLine

Przechowuje nowe znaki wiersza używane dla tego TextWriterelementu .

(Odziedziczone po TextWriter)
DefaultTabString

Określa domyślny ciąg karty. To pole jest stałe.

Właściwości

Encoding

Pobiera kodowanie dla modułu zapisywania tekstu do użycia.

FormatProvider

Pobiera obiekt, który kontroluje formatowanie.

(Odziedziczone po TextWriter)
Indent

Pobiera lub ustawia liczbę spacji do wcięcia.

InnerWriter

Pobiera element TextWriter do użycia.

NewLine

Pobiera lub ustawia nowy znak wiersza do użycia.

Metody

Close()

Zamyka zapisywany dokument.

CreateObjRef(Type)

Tworzy obiekt zawierający wszystkie istotne informacje wymagane do wygenerowania serwera proxy używanego do komunikowania się z obiektem zdalnym.

(Odziedziczone po MarshalByRefObject)
Dispose()

Zwalnia wszystkie zasoby używane przez TextWriter obiekt.

(Odziedziczone po TextWriter)
Dispose(Boolean)

Zwalnia zasoby niezarządzane używane przez element TextWriter i opcjonalnie zwalnia zasoby zarządzane.

(Odziedziczone po TextWriter)
DisposeAsync()

Wykonuje zadania zdefiniowane przez aplikację skojarzone z zwalnianiem, zwalnianiem lub resetowaniem niezarządzanych zasobów asynchronicznie.

DisposeAsync()

Asynchronicznie zwalnia wszystkie zasoby używane przez TextWriter obiekt.

(Odziedziczone po TextWriter)
Equals(Object)

Określa, czy dany obiekt jest taki sam, jak bieżący obiekt.

(Odziedziczone po Object)
Flush()

Opróżnia strumień.

FlushAsync()

Czyści wszystkie bufory dla tego IndentedTextWriter asynchronicznego i powoduje zapisanie wszystkich buforowanych danych na urządzeniu bazowym.

FlushAsync()

Asynchronicznie czyści wszystkie bufory dla bieżącego modułu zapisywania i powoduje zapisanie wszystkich buforowanych danych na urządzeniu bazowym.

(Odziedziczone po TextWriter)
FlushAsync(CancellationToken)

Czyści wszystkie bufory dla tego IndentedTextWriter asynchronicznego i powoduje zapisanie wszystkich buforowanych danych na urządzeniu bazowym.

FlushAsync(CancellationToken)

Asynchronicznie czyści wszystkie bufory dla bieżącego modułu zapisywania i powoduje zapisanie wszystkich buforowanych danych na urządzeniu bazowym.

(Odziedziczone po TextWriter)
GetHashCode()

Służy jako domyślna funkcja skrótu.

(Odziedziczone po Object)
GetLifetimeService()
Przestarzałe.

Pobiera bieżący obiekt usługi okresu istnienia, który kontroluje zasady okresu istnienia dla tego wystąpienia.

(Odziedziczone po MarshalByRefObject)
GetType()

Type Pobiera bieżące wystąpienie.

(Odziedziczone po Object)
InitializeLifetimeService()
Przestarzałe.

Uzyskuje obiekt usługi okresu istnienia, aby kontrolować zasady okresu istnienia dla tego wystąpienia.

(Odziedziczone po MarshalByRefObject)
MemberwiseClone()

Tworzy płytkią kopię bieżącego Objectelementu .

(Odziedziczone po Object)
MemberwiseClone(Boolean)

Tworzy płytkią kopię bieżącego MarshalByRefObject obiektu.

(Odziedziczone po MarshalByRefObject)
OutputTabs()

Zwraca ciąg tabulatora raz dla każdego poziomu wcięcia zgodnie z właściwością Indent .

OutputTabsAsync()

Asynchronicznie generuje karty bazowe TextWriter na podstawie bieżącego Indentelementu .

ToString()

Zwraca ciąg reprezentujący bieżący obiekt.

(Odziedziczone po Object)
Write(Boolean)

Zapisuje tekstową reprezentację wartości logicznej w strumieniu tekstowym.

Write(Char)

Zapisuje znak do strumienia tekstu.

Write(Char[])

Zapisuje tablicę znaków do strumienia tekstu.

Write(Char[], Int32, Int32)

Zapisuje podarraj znaków do strumienia tekstu.

Write(Decimal)

Zapisuje tekstową reprezentację wartości dziesiętnej w strumieniu tekstowym.

(Odziedziczone po TextWriter)
Write(Double)

Zapisuje reprezentację tekstu w strumieniu tekstowym Double do strumienia tekstowego.

Write(Int32)

Zapisuje reprezentację tekstu liczby całkowitej w strumieniu tekstowym.

Write(Int64)

Zapisuje reprezentację tekstową liczby całkowitej 8 bajtów w strumieniu tekstowym.

Write(Object)

Zapisuje reprezentację tekstu obiektu w strumieniu tekstowym.

Write(ReadOnlySpan<Char>)

Zapisuje zakres znaków do strumienia tekstu.

(Odziedziczone po TextWriter)
Write(Single)

Zapisuje tekstową reprezentację pojedynczego strumienia tekstu.

Write(String)

Zapisuje określony ciąg w strumieniu tekstowym.

Write(String, Object)

Zapisuje sformatowany ciąg przy użyciu tych samych semantyki, co określono.

Write(String, Object, Object)

Zapisuje sformatowany ciąg przy użyciu tych samych semantyki, co określono.

Write(String, Object, Object, Object)

Zapisuje sformatowany ciąg do strumienia tekstu przy użyciu tych samych semantyki co Format(String, Object, Object, Object) metoda.

(Odziedziczone po TextWriter)
Write(String, Object[])

Zapisuje sformatowany ciąg przy użyciu tych samych semantyki, co określono.

Write(String, ReadOnlySpan<Object>)

Udostępnia moduł zapisywania tekstu, który może wciąć nowe wiersze przy użyciu tokenu ciągu tabulatora.

Write(String, ReadOnlySpan<Object>)

Udostępnia moduł zapisywania tekstu, który może wciąć nowe wiersze przy użyciu tokenu ciągu tabulatora.

(Odziedziczone po TextWriter)
Write(StringBuilder)

Zapisuje konstruktora ciągów do strumienia tekstu.

(Odziedziczone po TextWriter)
Write(UInt32)

Zapisuje reprezentację tekstową 4-bajtowej liczby całkowitej bez znaku do strumienia tekstu.

(Odziedziczone po TextWriter)
Write(UInt64)

Zapisuje reprezentację tekstową 8-bajtowej liczby całkowitej bez znaku do strumienia tekstu.

(Odziedziczone po TextWriter)
WriteAsync(Char)

Asynchronicznie zapisuje określone Char karty na początku TextWriterkażdego wiersza.

WriteAsync(Char)

Zapisuje znak do strumienia tekstu asynchronicznie.

(Odziedziczone po TextWriter)
WriteAsync(Char[])

Zapisuje tablicę znaków w strumieniu tekstowym asynchronicznie.

(Odziedziczone po TextWriter)
WriteAsync(Char[], Int32, Int32)

Asynchronicznie zapisuje określoną liczbę Chars z określonego buforu do bazowego TextWriter, zaczynając od określonego indeksu, i kart wyjściowych na początku każdego nowego wiersza.

WriteAsync(Char[], Int32, Int32)

Zapisuje podarraj znaków do strumienia tekstu asynchronicznie.

(Odziedziczone po TextWriter)
WriteAsync(ReadOnlyMemory<Char>, CancellationToken)

Asynchronicznie zapisuje określone znaki do bazowego TextWriter, wstawia karty na początku każdego wiersza.

WriteAsync(ReadOnlyMemory<Char>, CancellationToken)

Asynchronicznie zapisuje region pamięci znaków w strumieniu tekstowym.

(Odziedziczone po TextWriter)
WriteAsync(String)

Asynchronicznie zapisuje określony ciąg do bazowego TextWriter, wstawia karty na początku każdego wiersza.

WriteAsync(String)

Zapisuje ciąg w strumieniu tekstowym asynchronicznie.

(Odziedziczone po TextWriter)
WriteAsync(StringBuilder, CancellationToken)

Asynchronicznie zapisuje zawartość określonego StringBuilder elementu do bazowego TextWriter, wstawia karty na początku każdego wiersza.

WriteAsync(StringBuilder, CancellationToken)

Asynchronicznie zapisuje konstruktora ciągów do strumienia tekstu.

(Odziedziczone po TextWriter)
WriteLine()

Zapisuje terminator wiersza.

WriteLine(Boolean)

Zapisuje reprezentację tekstową wartości logicznej, po której następuje terminator wiersza, do strumienia tekstu.

WriteLine(Char)

Zapisuje znak, po którym następuje terminator wiersza, do strumienia tekstowego.

WriteLine(Char[])

Zapisuje tablicę znaków, po której następuje terminator wiersza, do strumienia tekstowego.

WriteLine(Char[], Int32, Int32)

Zapisuje podarraj znaków, po którym następuje terminator wiersza, do strumienia tekstu.

WriteLine(Decimal)

Zapisuje tekstową reprezentację wartości dziesiętnej do strumienia tekstowego, a następnie terminator wiersza.

(Odziedziczone po TextWriter)
WriteLine(Double)

Zapisuje reprezentację tekstową elementu Double, po którym następuje terminator wiersza, do strumienia tekstowego.

WriteLine(Int32)

Zapisuje reprezentację tekstu liczby całkowitej, po której następuje terminator wiersza, do strumienia tekstu.

WriteLine(Int64)

Zapisuje reprezentację tekstową 8-bajtowej liczby całkowitej, a następnie terminator wiersza do strumienia tekstu.

WriteLine(Object)

Zapisuje reprezentację tekstową obiektu, po którym następuje terminator wiersza, do strumienia tekstu.

WriteLine(ReadOnlySpan<Char>)

Zapisuje tekstową reprezentację zakresu znaków w strumieniu tekstowym, a następnie terminator wiersza.

(Odziedziczone po TextWriter)
WriteLine(Single)

Zapisuje reprezentację tekstu pojedynczego, po którym następuje terminator wiersza, do strumienia tekstowego.

WriteLine(String)

Zapisuje określony ciąg, po którym następuje terminator wiersza, do strumienia tekstowego.

WriteLine(String, Object)

Zapisuje sformatowany ciąg, po którym następuje terminator wiersza, używając tych samych semantyki, jak określono.

WriteLine(String, Object, Object)

Zapisuje sformatowany ciąg, po którym następuje terminator wiersza, używając tych samych semantyki, jak określono.

WriteLine(String, Object, Object, Object)

Zapisuje sformatowany ciąg i nowy wiersz do strumienia tekstu przy użyciu tych samych semantyki co Format(String, Object).

(Odziedziczone po TextWriter)
WriteLine(String, Object[])

Zapisuje sformatowany ciąg, po którym następuje terminator wiersza, używając tych samych semantyki, jak określono.

WriteLine(String, ReadOnlySpan<Object>)

Udostępnia moduł zapisywania tekstu, który może wciąć nowe wiersze przy użyciu tokenu ciągu tabulatora.

WriteLine(String, ReadOnlySpan<Object>)

Udostępnia moduł zapisywania tekstu, który może wciąć nowe wiersze przy użyciu tokenu ciągu tabulatora.

(Odziedziczone po TextWriter)
WriteLine(StringBuilder)

Zapisuje tekstową reprezentację konstruktora ciągów w strumieniu tekstowym, a następnie terminator wiersza.

(Odziedziczone po TextWriter)
WriteLine(UInt32)

Zapisuje reprezentację tekstową UInt32, po której następuje terminator wiersza, do strumienia tekstowego.

WriteLine(UInt64)

Zapisuje reprezentację tekstową 8-bajtowej liczby całkowitej bez znaku do strumienia tekstu, a następnie terminator wiersza.

(Odziedziczone po TextWriter)
WriteLineAsync()

Asynchronicznie zapisuje terminator wiersza do bazowego TextWriterelementu .

WriteLineAsync()

Asynchronicznie zapisuje terminator wiersza do strumienia tekstu.

(Odziedziczone po TextWriter)
WriteLineAsync(Char)

Asynchronicznie zapisuje określony Char element do bazowego TextWriter , po którym następuje terminator wiersza, wstawia karty na początku każdego wiersza.

WriteLineAsync(Char)

Asynchronicznie zapisuje znak do strumienia tekstu, po którym następuje terminator wiersza.

(Odziedziczone po TextWriter)
WriteLineAsync(Char[])

Asynchronicznie zapisuje tablicę znaków do strumienia tekstu, a następnie terminator wiersza.

(Odziedziczone po TextWriter)
WriteLineAsync(Char[], Int32, Int32)

Asynchronicznie zapisuje określoną liczbę znaków z określonego buforu, po którym następuje terminator wiersza, do bazowego TextWriter, rozpoczynając od określonego indeksu w buforze, wstawiając karty na początku każdego wiersza.

WriteLineAsync(Char[], Int32, Int32)

Asynchronicznie zapisuje podarraj znaków do strumienia tekstu, a następnie terminator wiersza.

(Odziedziczone po TextWriter)
WriteLineAsync(ReadOnlyMemory<Char>, CancellationToken)

Asynchronicznie zapisuje określone znaki, po których następuje terminator wiersza do bazowego TextWriter, wstawia karty na początku każdego wiersza.

WriteLineAsync(ReadOnlyMemory<Char>, CancellationToken)

Asynchronicznie zapisuje tekstową reprezentację regionu pamięci znaków w strumieniu tekstowym, a następnie terminator wiersza.

(Odziedziczone po TextWriter)
WriteLineAsync(String)

Asynchronicznie zapisuje określony ciąg, po którym następuje terminator wiersza do bazowego TextWriter, wstawia karty na początku każdego wiersza.

WriteLineAsync(String)

Asynchronicznie zapisuje ciąg w strumieniu tekstowym, a następnie terminator wiersza.

(Odziedziczone po TextWriter)
WriteLineAsync(StringBuilder, CancellationToken)

Asynchronicznie zapisuje zawartość określonego StringBuilder wiersza, a następnie terminator wiersza do bazowego TextWriter, wstawia karty na początku każdego wiersza.

WriteLineAsync(StringBuilder, CancellationToken)

Asynchronicznie zapisuje tekstową reprezentację konstruktora ciągów w strumieniu tekstowym, a następnie terminator wiersza.

(Odziedziczone po TextWriter)
WriteLineNoTabs(String)

Zapisuje określony ciąg w wierszu bez kart.

WriteLineNoTabsAsync(String)

Asynchronicznie zapisuje określony ciąg do bazowego TextWriter bez wstawiania kart.

Jawne implementacje interfejsu

IDisposable.Dispose()

Aby uzyskać opis tego elementu członkowskiego, zobacz Dispose().

(Odziedziczone po TextWriter)

Metody rozszerzania

ConfigureAwait(IAsyncDisposable, Boolean)

Konfiguruje sposób oczekiwania na zadania zwracane z asynchronicznego jednorazowego wykonania.

Dotyczy