Class TextWriterAdapter
Adapter that extends TextWriter and forwards all messages to an instance of TextWriter.
public abstract class TextWriterAdapter : TextWriter, IDisposable, IAsyncDisposable
- Inheritance
-
TextWriterAdapter
- Implements
- Derived
- Inherited Members
Remarks
Adapter that extends TextWriter and forwards all messages to an instance of TextWriter.
Constructors
TextWriterAdapter(TextWriter)
Create an instance of TextWriterAdapter that forwards all messages to a TextWriter.
protected TextWriterAdapter(TextWriter writer)
Parameters
writerTextWriterThe TextWriter to forward to
Remarks
Create an instance of TextWriterAdapter that forwards all messages to a TextWriter.
Properties
Encoding
The Encoding in which the output is written
public override Encoding Encoding { get; }
Property Value
Remarks
The Encoding in which the output is written
FormatProvider
Gets an object that controls formatting
public override IFormatProvider FormatProvider { get; }
Property Value
- IFormatProvider
The format provider
Remarks
Gets an object that controls formatting
NewLine
Gets or sets the line terminator string used by the TextWriter
public override string NewLine { get; set; }
Property Value
- string
The line terminator to use
Remarks
Gets or sets the line terminator string used by the TextWriter
Writer
Gets or sets the underlying TextWriter.
protected TextWriter Writer { get; set; }
Property Value
- TextWriter
The underlying TextWriter.
Remarks
Gets or sets the underlying TextWriter.
Methods
Close()
Closes the writer and releases any system resources associated with the writer
public override void Close()
Remarks
Dispose(bool)
Dispose this writer
protected override void Dispose(bool disposing)
Parameters
disposingboolflag indicating if we are being disposed
Remarks
Dispose this writer
Flush()
Flushes any buffered output
public override void Flush()
Remarks
Clears all buffers for the writer and causes any buffered data to be written to the underlying device
Write(char)
Writes a character to the wrapped TextWriter
public override void Write(char value)
Parameters
valuecharthe value to write to the TextWriter
Remarks
Writes a character to the wrapped TextWriter
Write(char[], int, int)
Writes a character buffer to the wrapped TextWriter
public override void Write(char[] buffer, int index, int count)
Parameters
Remarks
Writes a character buffer to the wrapped TextWriter
Write(string)
Writes a string to the wrapped TextWriter
public override void Write(string value)
Parameters
valuestringthe value to write to the TextWriter
Remarks
Writes a string to the wrapped TextWriter