IndentedTextWriter Classe

Definizione

Fornisce un writer di testo in grado di applicare un rientro alle nuove righe in base a un token relativo a una stringa di tabulazioni.

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

Esempio

Nell'esempio di codice seguente viene illustrato l'uso di un IndentedTextWriter oggetto per scrivere testo a diversi livelli di rientro.

#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

Commenti

IndentedTextWriter estende un TextWriter oggetto fornendo metodi che inseriscono una stringa di tabulazione e tengono traccia del livello di rientro corrente. Il testo formattato con più livelli di rientro è utile per il codice generato, quindi questa classe viene usata dalle implementazioni del generatore di codice CodeDOM.

La stringa di tabulazione è la stringa di cui è costituito ogni rientro. In genere la stringa di tabulazioni contiene spazi vuoti.

Nota

Questa classe contiene una richiesta di collegamento e una richiesta di ereditarietà a livello di classe che si applica a tutti i membri. Viene SecurityException generata un'eccezione quando il chiamante immediato o la classe derivata non dispone dell'autorizzazione di attendibilità totale. Per informazioni dettagliate sulle richieste di sicurezza, vedere Richieste di collegamento e richieste di ereditarietà.

Costruttori

IndentedTextWriter(TextWriter)

Inizializza una nuova istanza della classe IndentedTextWriter utilizzando il writer di testo specificato e la stringa di tabulazioni predefinita.

IndentedTextWriter(TextWriter, String)

Inizializza una nuova istanza della classe IndentedTextWriter utilizzando il writer di testo e la stringa di tabulazioni specificati.

Campi

CoreNewLine

Archivia i caratteri di nuova riga usati per questo TextWriter.

(Ereditato da TextWriter)
DefaultTabString

Specifica la stringa di tabulazioni predefinita. Questo campo è costante.

Proprietà

Encoding

Ottiene la codifica che deve essere utilizzata dal writer di testo.

FormatProvider

Ottiene un oggetto che controlla la formattazione.

(Ereditato da TextWriter)
Indent

Ottiene o imposta il numero di spazi da utilizzare per il rientro.

InnerWriter

Ottiene l'oggetto TextWriter da utilizzare.

NewLine

Ottiene o imposta il carattere di nuova riga da utilizzare.

Metodi

Close()

Chiude il documento in cui viene effettuata la scrittura.

CreateObjRef(Type)

Consente di creare un oggetto che contiene tutte le informazioni rilevanti necessarie per la generazione del proxy utilizzato per effettuare la comunicazione con un oggetto remoto.

(Ereditato da MarshalByRefObject)
Dispose()

Rilascia tutte le risorse usate dall'oggetto TextWriter.

(Ereditato da TextWriter)
Dispose(Boolean)

Rilascia le risorse non gestite usate da TextWriter e, facoltativamente, le risorse gestite.

(Ereditato da TextWriter)
DisposeAsync()

Esegue attività definite dall'applicazione, ad esempio libera, rilascia o reimposta risorse non gestite in modo asincrono.

DisposeAsync()

Rilascia in modo asincrono tutte le risorse usate dall'oggetto TextWriter.

(Ereditato da TextWriter)
Equals(Object)

Determina se l'oggetto specificato è uguale all'oggetto corrente.

(Ereditato da Object)
Flush()

Svuota il flusso.

FlushAsync()

Cancella tutti i buffer per questo IndentedTextWriter oggetto in modo asincrono e causa la scrittura di tutti i dati memorizzati nel buffer nel dispositivo sottostante.

FlushAsync()

Cancella in modo asincrono i dati di tutti i buffer del writer corrente e consente la scrittura dei dati memorizzati nel buffer nel dispositivo sottostante.

(Ereditato da TextWriter)
FlushAsync(CancellationToken)

Cancella tutti i buffer per questo IndentedTextWriter oggetto in modo asincrono e causa la scrittura di tutti i dati memorizzati nel buffer nel dispositivo sottostante.

FlushAsync(CancellationToken)

Cancella in modo asincrono i dati di tutti i buffer del writer corrente e consente la scrittura dei dati memorizzati nel buffer nel dispositivo sottostante.

(Ereditato da TextWriter)
GetHashCode()

Funge da funzione hash predefinita.

(Ereditato da Object)
GetLifetimeService()
Obsoleti.

Consente di recuperare l'oggetto servizio di durata corrente per controllare i criteri di durata per l'istanza.

(Ereditato da MarshalByRefObject)
GetType()

Ottiene l'oggetto Type dell'istanza corrente.

(Ereditato da Object)
InitializeLifetimeService()
Obsoleti.

Ottiene un oggetto servizio di durata per controllare i criteri di durata per questa istanza.

(Ereditato da MarshalByRefObject)
MemberwiseClone()

Crea una copia superficiale dell'oggetto Object corrente.

(Ereditato da Object)
MemberwiseClone(Boolean)

Crea una copia dei riferimenti dell'oggetto MarshalByRefObject corrente.

(Ereditato da MarshalByRefObject)
OutputTabs()

Restituisce la stringa di tabulazioni una volta per ciascun livello di rientro in base alla proprietà Indent.

OutputTabsAsync()

Esegue l'output asincrono delle schede al sottostante TextWriter in base all'oggetto corrente Indent.

ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.

(Ereditato da Object)
Write(Boolean)

Inserisce nel flusso di testo la rappresentazione testuale di un valore booleano.

Write(Char)

Scrive un carattere nel flusso di testo.

Write(Char[])

Scrive una matrice di caratteri nel flusso di testo.

Write(Char[], Int32, Int32)

Scrive una sottomatrice di caratteri nel flusso di testo.

Write(Decimal)

Scrive nel flusso di testo la rappresentazione testuale di un valore decimale.

(Ereditato da TextWriter)
Write(Double)

Inserisce nel flusso di testo la rappresentazione testuale di un valore Double.

Write(Int32)

Inserisce nel flusso di testo la rappresentazione testuale di un intero.

Write(Int64)

Inserisce nel flusso di testo la rappresentazione testuale di un intero a 8 byte.

Write(Object)

Inserisce nel flusso di testo la rappresentazione testuale di un oggetto.

Write(ReadOnlySpan<Char>)

Scrive un intervallo di caratteri nel flusso di testo.

(Ereditato da TextWriter)
Write(Single)

Inserisce nel flusso di testo la rappresentazione testuale di un valore Single.

Write(String)

Inserisce nel flusso di testo la stringa specificata.

Write(String, Object)

Inserisce una stringa formattata utilizzando la semantica specificata.

Write(String, Object, Object)

Inserisce una stringa formattata utilizzando la semantica specificata.

Write(String, Object, Object, Object)

Scrive una stringa formattata nel flusso di testo, usando la stessa semantica del metodo Format(String, Object, Object, Object).

(Ereditato da TextWriter)
Write(String, Object[])

Inserisce una stringa formattata utilizzando la semantica specificata.

Write(StringBuilder)

Scrive un generatore di stringhe nel flusso di testo.

(Ereditato da TextWriter)
Write(UInt32)

Scrive nel flusso di testo la rappresentazione testuale di un intero a 4 byte senza segno.

(Ereditato da TextWriter)
Write(UInt64)

Scrive nel flusso di testo la rappresentazione testuale di un intero a 8 byte senza segno.

(Ereditato da TextWriter)
WriteAsync(Char)

Scrive in modo asincrono l'oggetto specificato Char nella scheda sottostante TextWriter, inserendo le schede all'inizio di ogni riga.

WriteAsync(Char)

Scrive un carattere nel flusso di testo in modo asincrono.

(Ereditato da TextWriter)
WriteAsync(Char[])

Scrive una matrice di caratteri in modo asincrono nel flusso di testo.

(Ereditato da TextWriter)
WriteAsync(Char[], Int32, Int32)

Scrive in modo asincrono il numero specificato di Chars dal buffer specificato al buffer sottostante TextWriter, a partire dall'indice specificato e le schede di output all'inizio di ogni nuova riga.

WriteAsync(Char[], Int32, Int32)

Scrive una sottomatrice di caratteri nel flusso di testo in modo asincrono.

(Ereditato da TextWriter)
WriteAsync(ReadOnlyMemory<Char>, CancellationToken)

Scrive in modo asincrono i caratteri specificati nelle schede sottostanti TextWriter, inserendo le schede all'inizio di ogni riga.

WriteAsync(ReadOnlyMemory<Char>, CancellationToken)

Scrive in modo asincrono un'area di memoria dei caratteri nel flusso di testo.

(Ereditato da TextWriter)
WriteAsync(String)

Scrive in modo asincrono la stringa specificata nella scheda sottostante TextWriter, inserendo le schede all'inizio di ogni riga.

WriteAsync(String)

Scrive una stringa nel flusso di testo in modo asincrono.

(Ereditato da TextWriter)
WriteAsync(StringBuilder, CancellationToken)

Scrive in modo asincrono il contenuto dell'oggetto specificato StringBuilder nella scheda sottostante TextWriter, inserendo le schede all'inizio di ogni riga.

WriteAsync(StringBuilder, CancellationToken)

Scrive in modo asincrono un generatore di stringhe nel flusso di testo.

(Ereditato da TextWriter)
WriteLine()

Inserisce un terminatore di riga.

WriteLine(Boolean)

Inserisce nel flusso di testo la rappresentazione testuale di un valore booleano, seguita da un terminatore di riga.

WriteLine(Char)

Inserisce nel flusso di testo un carattere, seguito da un terminatore di riga.

WriteLine(Char[])

Inserisce nel flusso di testo una matrice di caratteri, seguita da un terminatore di riga.

WriteLine(Char[], Int32, Int32)

Inserisce nel flusso di testo una sottomatrice di caratteri, seguita da un terminatore di riga.

WriteLine(Decimal)

Scrive la rappresentazione testuale di un valore decimale nel flusso di testo, seguita da un terminatore di riga.

(Ereditato da TextWriter)
WriteLine(Double)

Inserisce nel flusso di testo la rappresentazione testuale di un valore Double, seguita da un terminatore di riga.

WriteLine(Int32)

Inserisce nel flusso di testo la rappresentazione testuale di un intero, seguita da un terminatore di riga.

WriteLine(Int64)

Inserisce nel flusso di testo la rappresentazione testuale di un intero a 8 byte, seguita da un terminatore di riga.

WriteLine(Object)

Inserisce nel flusso di testo la rappresentazione testuale di un oggetto, seguita da un terminatore di riga.

WriteLine(ReadOnlySpan<Char>)

Scrive nel flusso di testo la rappresentazione testuale di un intervallo di caratteri, seguita da un terminatore di riga.

(Ereditato da TextWriter)
WriteLine(Single)

Inserisce nel flusso di testo la rappresentazione testuale di un valore Single, seguita da un terminatore di riga.

WriteLine(String)

Inserisce nel flusso di testo la stringa specificata, seguita da un terminatore di riga.

WriteLine(String, Object)

Inserisce una stringa formattata seguita da un terminatore di riga, utilizzando la semantica specificata.

WriteLine(String, Object, Object)

Inserisce una stringa formattata seguita da un terminatore di riga, utilizzando la semantica specificata.

WriteLine(String, Object, Object, Object)

Scrive una stringa formattata e una nuova riga nel flusso di testo, usando la stessa semantica di Format(String, Object).

(Ereditato da TextWriter)
WriteLine(String, Object[])

Inserisce una stringa formattata seguita da un terminatore di riga, utilizzando la semantica specificata.

WriteLine(StringBuilder)

Scrive nel flusso di testo la rappresentazione testuale di un generatore di stringhe, seguita da un terminatore di riga.

(Ereditato da TextWriter)
WriteLine(UInt32)

Inserisce nel flusso di testo la rappresentazione testuale di un valore UInt32, seguita da un terminatore di riga.

WriteLine(UInt64)

Scrive la rappresentazione testuale di un intero a 8 byte senza segno nel flusso di testo, seguita da un terminatore di riga.

(Ereditato da TextWriter)
WriteLineAsync()

Scrive in modo asincrono il terminatore della riga nell'oggetto sottostante TextWriter.

WriteLineAsync()

Scrive in modo asincrono un terminatore di riga nel flusso di testo.

(Ereditato da TextWriter)
WriteLineAsync(Char)

Scrive in modo asincrono l'oggetto specificato Char nel sottostante TextWriter seguito da un terminatore di riga, inserendo schede all'inizio di ogni riga.

WriteLineAsync(Char)

Scrive un carattere in modo asincrono nel flusso di testo, seguito da un terminatore di riga.

(Ereditato da TextWriter)
WriteLineAsync(Char[])

Scrive in modo asincrono una matrice di caratteri nel flusso di testo, seguiti da un terminatore di riga.

(Ereditato da TextWriter)
WriteLineAsync(Char[], Int32, Int32)

Scrive in modo asincrono il numero specificato di caratteri dal buffer specificato seguito da un terminatore di riga, al sottostante TextWriter, a partire dall'indice specificato all'interno del buffer, inserendo schede all'inizio di ogni riga.

WriteLineAsync(Char[], Int32, Int32)

Scrive in modo asincrono una sottomatrice di caratteri nel flusso di testo, seguiti da un terminatore di riga.

(Ereditato da TextWriter)
WriteLineAsync(ReadOnlyMemory<Char>, CancellationToken)

Scrive in modo asincrono i caratteri specificati seguiti da un terminatore di riga nelle schede sottostanti TextWriter, inserendo le schede all'inizio di ogni riga.

WriteLineAsync(ReadOnlyMemory<Char>, CancellationToken)

Scrive in modo asincrono la rappresentazione testuale di un'area di memoria dei caratteri nel flusso di testo, seguita da un terminatore di riga.

(Ereditato da TextWriter)
WriteLineAsync(String)

Scrive in modo asincrono la stringa specificata seguita da un terminatore di riga nella scheda sottostante TextWriter, inserendo le schede all'inizio di ogni riga.

WriteLineAsync(String)

Scrive una stringa in modo asincrono nel flusso di testo, seguita da un terminatore di riga.

(Ereditato da TextWriter)
WriteLineAsync(StringBuilder, CancellationToken)

Scrive in modo asincrono il contenuto dell'oggetto specificato StringBuilder seguito da un terminatore di riga nella scheda sottostante TextWriter, inserendo le schede all'inizio di ogni riga.

WriteLineAsync(StringBuilder, CancellationToken)

Scrive in modo asincrono nel flusso di testo la rappresentazione testuale di un generatore di stringhe, seguita da un terminatore di riga.

(Ereditato da TextWriter)
WriteLineNoTabs(String)

Inserisce la stringa specificata in una riga priva di tabulazioni.

WriteLineNoTabsAsync(String)

Scrive in modo asincrono la stringa specificata nel sottostante TextWriter senza inserire schede.

Implementazioni dell'interfaccia esplicita

IDisposable.Dispose()

Per una descrizione di questo membro, vedere Dispose().

(Ereditato da TextWriter)

Metodi di estensione

ConfigureAwait(IAsyncDisposable, Boolean)

Consente di configurare la modalità di esecuzione delle espressioni await per le attività restituite da un elemento disposable asincrono.

Si applica a