# Class NpgsqlCopyTextReader

Namespace
  Npgsql

Assembly
  Npgsql.dll

Reader for a text export, initiated by BeginTextExport(string).

    public sealed class NpgsqlCopyTextReader : StreamReader, IDisposable, IAsyncDisposable

Inheritance
  object
  MarshalByRefObject
  TextReader
  StreamReader
  NpgsqlCopyTextReader

Implements
  IDisposable
  IAsyncDisposable

Inherited Members
  StreamReader.Null
  StreamReader.Close()
  StreamReader.DiscardBufferedData()
  StreamReader.Peek()
  StreamReader.Read()
  StreamReader.Read(char[], int, int)
  StreamReader.Read(Span<char>)
  StreamReader.ReadAsync(char[], int, int)
  StreamReader.ReadAsync(Memory<char>, CancellationToken)
  StreamReader.ReadBlock(char[], int, int)
  StreamReader.ReadBlock(Span<char>)
  StreamReader.ReadBlockAsync(char[], int, int)
  StreamReader.ReadBlockAsync(Memory<char>, CancellationToken)
  StreamReader.ReadLine()
  StreamReader.ReadLineAsync()
  StreamReader.ReadLineAsync(CancellationToken)
  StreamReader.ReadToEnd()
  StreamReader.ReadToEndAsync()
  StreamReader.ReadToEndAsync(CancellationToken)
  StreamReader.BaseStream
  StreamReader.CurrentEncoding
  StreamReader.EndOfStream
  TextReader.Dispose()
  TextReader.Synchronized(TextReader)
  MarshalByRefObject.GetLifetimeService()
  MarshalByRefObject.InitializeLifetimeService()
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.ReferenceEquals(object, object)
  object.ToString()

## Remarks

See https://www.postgresql.org/docs/current/static/sql-copy.html.

## Methods

### Cancel()

Cancels and terminates an ongoing export.

    public void Cancel()

### CancelAsync()

Asynchronously cancels and terminates an ongoing export.

    public Task CancelAsync()

#### Returns

Task

### DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

    public ValueTask DisposeAsync()

#### Returns

ValueTask

  A task that represents the asynchronous dispose operation.