public class IndentedTextWriter : TextWriter
|
The tab string is the string that each indentation consists of. Typically the tab string contains white space.
ctor #1 | Overloaded:.ctor(TextWriter writer) Initializes a new instance of the IndentedTextWriter class using the specified text writer and default tab string. |
ctor #2 | Overloaded:.ctor(TextWriter writer, string tabString) Initializes a new instance of the IndentedTextWriter class using the specified text writer and tab string. |
DefaultTabString | Gets or sets the default tab string. |
Encoding | Read-only Overridden: Gets the encoding for the text writer to use. |
FormatProvider (inherited from System.IO.TextWriter) |
Read-only See base class member description: System.IO.TextWriter.FormatProvider Gets an object that controls formatting. |
Indent | Read-write Gets or sets the number of spaces to indent. |
InnerWriter | Read-only Gets the TextWriter to use. |
NewLine | Read-write Overridden: Gets or sets the new line character to use. |
Close | Overridden: Closes the document being written to. |
CreateObjRef (inherited from System.MarshalByRefObject) |
See base class member description: System.MarshalByRefObject.CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
Flush | Overridden: Flushes the stream. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetLifetimeService (inherited from System.MarshalByRefObject) |
See base class member description: System.MarshalByRefObject.GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
InitializeLifetimeService (inherited from System.MarshalByRefObject) |
See base class member description: System.MarshalByRefObject.InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
Write | Overloaded:Write(bool value) Overridden: Writes the text representation of a Boolean value to the text stream. |
Write | Overloaded:Write(char value) Overridden: Writes a character to the text stream. |
Write | Overloaded:Write(char[] buffer) Overridden: Writes a character array to the text stream. |
Write (inherited from System.IO.TextWriter) |
Overloaded:Write(decimal value) See base class member description: System.IO.TextWriter.WriteWrites the text representation of a decimal value followed by a line terminator to the text stream. |
Write | Overloaded:Write(double value) Overridden: Writes the text representation of a Double to the text stream. |
Write | Overloaded:Write(int value) Overridden: Writes the text representation of an integer to the text stream. |
Write | Overloaded:Write(long value) Overridden: Writes the text representation of an 8-byte integer to the text stream. |
Write | Overloaded:Write(object value) Overridden: Writes the text representation of an object to the text stream. |
Write | Overloaded:Write(float value) Overridden: Writes the text representation of a Single to the text stream. |
Write | Overloaded:Write(string s) Overridden: Writes the specified string to the text stream. |
Write (inherited from System.IO.TextWriter) |
Overloaded:Write(uint value) See base class member description: System.IO.TextWriter.WriteWrites the text representation of a 4-byte unsigned integer to the text stream. |
Write (inherited from System.IO.TextWriter) |
Overloaded:Write(ulong value) See base class member description: System.IO.TextWriter.WriteWrites the text representation of an 8-byte unsigned integer to the text stream. |
Write | Overloaded:Write(string format, object arg0) Overridden: Writes out a formatted string, using the same semantics as specified. |
Write | Overloaded:Write(string format, params object[] arg) Overridden: Writes out a formatted string, using the same semantics as specified. |
Write | Overloaded:Write(char[] buffer, int index, int count) Overridden: Writes a subarray of characters to the text stream. |
Write | Overloaded:Write(string format, object arg0, object arg1) Overridden: Writes out a formatted string, using the same semantics as specified. |
Write (inherited from System.IO.TextWriter) |
Overloaded:Write(string format, object arg0, object arg1, object arg2) See base class member description: System.IO.TextWriter.WriteWrites out a formatted string, using the same semantics as String.Format. |
WriteLine | Overloaded:WriteLine() Overridden: Writes a line terminator. |
WriteLine | Overloaded:WriteLine(bool value) Overridden: Writes the text representation of a Boolean, followed by a line terminator, to the text stream. |
WriteLine | Overloaded:WriteLine(char value) Overridden: Writes a character, followed by a line terminator, to the text stream. |
WriteLine | Overloaded:WriteLine(char[] buffer) Overridden: Writes a character array, followed by a line terminator, to the text stream. |
WriteLine (inherited from System.IO.TextWriter) |
Overloaded:WriteLine(decimal value) See base class member description: System.IO.TextWriter.WriteLineWrites the text representation of a decimal value followed by a line terminator to the text stream. |
WriteLine | Overloaded:WriteLine(double value) Overridden: Writes the text representation of a Double, followed by a line terminator, to the text stream. |
WriteLine | Overloaded:WriteLine(int value) Overridden: Writes the text representation of an integer, followed by a line terminator, to the text stream. |
WriteLine | Overloaded:WriteLine(long value) Overridden: Writes the text representation of an 8-byte integer, followed by a line terminator, to the text stream. |
WriteLine | Overloaded:WriteLine(object value) Overridden: Writes the text representation of an object, followed by a line terminator, to the text stream. |
WriteLine | Overloaded:WriteLine(float value) Overridden: Writes the text representation of a Single, followed by a line terminator, to the text stream. |
WriteLine | Overloaded:WriteLine(string s) Overridden: Writes the specified string, followed by a line terminator, to the text stream. |
WriteLine | Overloaded:WriteLine(uint value) Overridden: Writes the text representation of a UInt32, followed by a line terminator, to the text stream. |
WriteLine (inherited from System.IO.TextWriter) |
Overloaded:WriteLine(ulong value) See base class member description: System.IO.TextWriter.WriteLineWrites the text representation of an 8-byte unsigned integer followed by a line terminator to the text stream. |
WriteLine | Overloaded:WriteLine(string format, object arg0) Overridden: Writes out a formatted string, followed by a line terminator, using the same semantics as specified. |
WriteLine | Overloaded:WriteLine(string format, params object[] arg) Overridden: Writes out a formatted string, followed by a line terminator, using the same semantics as specified. |
WriteLine | Overloaded:WriteLine(char[] buffer, int index, int count) Overridden: Writes a subarray of characters, followed by a line terminator, to the text stream. |
WriteLine | Overloaded:WriteLine(string format, object arg0, object arg1) Overridden: Writes out a formatted string, followed by a line terminator, using the same semantics as specified. |
WriteLine (inherited from System.IO.TextWriter) |
Overloaded:WriteLine(string format, object arg0, object arg1, object arg2) See base class member description: System.IO.TextWriter.WriteLineWrites out a formatted string and a new line, using the same semantics as String.Format. |
WriteLineNoTabs | Writes the specified string to a line without tabs. |
CoreNewLine (inherited from System.IO.TextWriter) |
See base class member description: System.IO.TextWriter.CoreNewLine Stores the new line characters used for this TextWriter. |
Dispose (inherited from System.IO.TextWriter) |
See base class member description: System.IO.TextWriter.Dispose Releases the unmanaged resources used by the TextWriter and optionally releases the managed resources. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
OutputTabs | Outputs the tab string once for each level of indentation according to the IndentedTextWriter.Indent property. |
Hierarchy:
public IndentedTextWriter( |
writer
public IndentedTextWriter( |
writer
tabString
protected char[] CoreNewLine;
|
public const string DefaultTabString;
|
public override Encoding Encoding {get;}
|
public virtual IFormatProvider FormatProvider {get;}
|
public int Indent {get; set;}
|
public TextWriter InnerWriter {get;}
|
public override string NewLine {get; set;}
|
public override void Close(); |
requestedType
Exception Type | Condition |
---|---|
RemotingException | This instance is not a valid remoting object. |
protected virtual void Dispose( |
disposing
When the disposing parameter is true, this method releases all resources held by any managed objects that this TextWriter references. This method invokes the Dispose() method of each referenced object.
For more information about Dispose and Object.Finalize, see the conceptual topic at MSDN: cleaningupunmanagedresources and the conceptual topic at MSDN: overridingfinalizemethod.
~IndentedTextWriter(); |
public override void Flush(); |
public virtual int GetHashCode(); |
public object GetLifetimeService(); |
public Type GetType(); |
public virtual object InitializeLifetimeService(); |
public class MyClass : MarshalByRefObject { public override Object InitializeLifetimeService() { ILease lease = (ILease)base.InitializeLifetimeService(); if (lease.CurrentState == LeaseState.Initial) { lease.InitialLeaseTime = TimeSpan.FromMinutes(1); lease.SponsorshipTimeout = TimeSpan.FromMinutes(2); lease.RenewOnCallTime = TimeSpan.FromSeconds(2); } return lease; } }
protected object MemberwiseClone(); |
protected virtual void OutputTabs(); |
public virtual string ToString(); |
public override void Write( |
value
public override void Write( |
value
public override void Write( |
buffer
public virtual void Write( |
value
Exception Type | Condition |
---|---|
IOException | An I/O error occurs. |
public override void Write( |
value
public override void Write( |
value
public override void Write( |
value
public override void Write( |
value
public override void Write( |
value
public override void Write( |
s
[CLSCompliant(false)] |
value
Exception Type | Condition |
---|---|
IOException | An I/O error occurs, such as the stream being closed. |
[CLSCompliant(false)] |
value
Exception Type | Condition |
---|---|
IOException | An I/O error occurs, such as the stream being closed. |
format
arg0
format
arg
buffer
index
count
format
arg0
arg1
format
arg0
arg1
arg2
Exception Type | Condition |
---|---|
ArgumentNullException | format or any of the arg parameters is null. -or- An object referenced in the format string is null. |
IOException | An I/O error occurs, such as the stream being closed. |
FormatException | The format specification in format is invalid. -or- The number indicating an argument to be formatted is less than zero, or larger than or equal to the number of provided objects to be formatted . |
This method does not search the specified String for individual newline characters(hexadecimal 0x000a) and replace them with TextWriter.NewLine.
If a specified object is not referenced in the format string, it is ignored.
public override void WriteLine(); |
public override void WriteLine( |
value
public override void WriteLine( |
value
public override void WriteLine( |
buffer
public virtual void WriteLine( |
value
Exception Type | Condition |
---|---|
IOException | An I/O error occurs. |
public override void WriteLine( |
value
public override void WriteLine( |
value
public override void WriteLine( |
value
public override void WriteLine( |
value
public override void WriteLine( |
value
public override void WriteLine( |
s
[CLSCompliant(false)] |
value
[CLSCompliant(false)] |
value
Exception Type | Condition |
---|---|
IOException | An I/O error occurs, such as the stream being closed. |
format
arg0
format
arg
buffer
index
count
format
arg0
arg1
format
arg0
arg1
arg2
Exception Type | Condition |
---|---|
ArgumentNullException | A string or object is passed in as null. -or- An object referenced in the format string is null. |
IOException | An I/O error occurs, such as the stream being closed. |
FormatException | The format specification in format is invalid. -or- The number indicating an argument to be formatted is less than zero, or larger than or equal to the number of provided objects to be formatted. |
This method does not search the specified String for individual newline characters(hexadecimal 0x000a) and replace them with TextWriter.NewLine.
If a specified object is not referenced in the format string, it is ignored.
public void WriteLineNoTabs( |
s