Class IndentingWriter
An IndentingWriter is used to indent line-based output to an underlying TextWriter.
Inherited Members
Namespace: Tangosol.IO
Assembly: Coherence.dll
Syntax
public class IndentingWriter : TextWriter, IAsyncDisposable, IDisposable
Constructors
IndentingWriter(TextWriter, int)
Construct an IndentingWriter that indents a certain number of spaces.
Declaration
public IndentingWriter(TextWriter writer, int spaces)
Parameters
Type | Name | Description |
---|---|---|
TextWriter | writer | The underlying TextWriter to write to. |
int | spaces | The number of spaces to indent each line with. |
IndentingWriter(TextWriter, string)
Construct an IndentingWriter that indents using an indention string.
Declaration
public IndentingWriter(TextWriter writer, string indent)
Parameters
Type | Name | Description |
---|---|---|
TextWriter | writer | The underlying TextWriter to write to. |
string | indent | The string value to indent each line with. |
Properties
Encoding
When overridden in a derived class, returns the Encoding in which the output is written.
Declaration
public override Encoding Encoding { get; }
Property Value
Type | Description |
---|---|
Encoding | The Encoding in which the output is written. |
Overrides
Methods
Resume()
Resumes indentation.
Declaration
public virtual void Resume()
Suspend()
Suspends indentation.
Declaration
public virtual void Suspend()
Write(char)
Writes a character to the text stream.
Declaration
public override void Write(char value)
Parameters
Type | Name | Description |
---|---|---|
char | value | The character to write to the text stream. |
Overrides
Write(char[])
Writes a character array to the text stream.
Declaration
public override void Write(char[] buffer)
Parameters
Type | Name | Description |
---|---|---|
char[] | buffer | The character array to write to the text stream. |
Overrides
Write(char[], int, int)
Writes a subarray of characters to the text stream.
Declaration
public override void Write(char[] buffer, int index, int count)
Parameters
Type | Name | Description |
---|---|---|
char[] | buffer | The character array to write data from. |
int | index | Starting index in the buffer. |
int | count | The number of characters to write. |
Overrides
Write(string)
Writes a string to the text stream.
Declaration
public override void Write(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The string to write. |
Overrides
WriteLine()
Writes a line terminator to the text stream.
Declaration
public override void WriteLine()