IndentTextWriterVisitor Class

The visitor implementaion to write the HTML document into text with indentation.

C#
public sealed class IndentTextWriterVisitor : AbstractTextWriterVisitor
Inheritance
IndentTextWriterVisitor
Implements

Constructors

Methods

WriteStartTagHook(TagStruct)

Description copied from class: AbstractTextWriterVisitor

The hook to write the start tag, which is invoked just before the tag starts. The method overriding this method must invoke AbstractTextWriterVisitor.WriteStartTag(TagStruct) with the specified tag.

WriteEndTagHook(TagStruct)

Description copied from class: AbstractTextWriterVisitor

The hook to write the end tag, which is invoked just before the tag ends. The method overriding this method must invoke AbstractTextWriterVisitor.WriteEndTag(TagStruct) with the specified tag.

BeforeEmptyOrText()

Description copied from class: AbstractTextWriterVisitor

The hook called before the empty tag or the text node.

VisitEmptyTag(TagStruct)

Description copied from interface: NodeVisitor

Performs the operation on the empty Tag representing a void element.

(Inherited from AbstractTextWriterVisitor)
VisitEntity(string)

Description copied from interface: NodeVisitor

Performs the operation on the entity node.

(Inherited from AbstractTextWriterVisitor)
VisitTag(TagStruct)

Description copied from interface: NodeVisitor

Performs the operation on the Tag.

(Inherited from AbstractTextWriterVisitor)
VisitText(string)

Description copied from interface: NodeVisitor

Performs the operation on the text node.

(Inherited from AbstractTextWriterVisitor)
WriteStartTag(TagStruct)

Writes a start tag.

(Inherited from AbstractTextWriterVisitor)
WriteEndTag(TagStruct)

Writes an end tag.

(Inherited from AbstractTextWriterVisitor)
WriteStartTagHook(TagStruct)

The hook to write the start tag, which is invoked just before the tag starts. The method overriding this method must invoke AbstractTextWriterVisitor.WriteStartTag(TagStruct) with the specified tag.

(Inherited from AbstractTextWriterVisitor)
WriteEndTagHook(TagStruct)

The hook to write the end tag, which is invoked just before the tag ends. The method overriding this method must invoke AbstractTextWriterVisitor.WriteEndTag(TagStruct) with the specified tag.

(Inherited from AbstractTextWriterVisitor)
BeforeEmptyOrText()

The hook called before the empty tag or the text node.

(Inherited from AbstractTextWriterVisitor)
Write(ReadOnlySpan<char>)

Writes characters into the text stream.

(Inherited from AbstractTextWriterVisitor)
Write(string)

Writes a string into the text stream.

(Inherited from AbstractTextWriterVisitor)
Equals(object) (Inherited from object)
GetHashCode() (Inherited from object)
GetType() (Inherited from object)
MemberwiseClone() (Inherited from object)
ToString() (Inherited from object)

Constructors Detail

IndentTextWriterVisitor(TextWriter, FormatOptions)

Initializes a new instance of the IndentTextWriterVisitor class.

C#
public IndentTextWriterVisitor(TextWriter writer, FormatOptions options)

Parameters

writer
TextWriter

The text writer object for this visitor to output.

options
FormatOptions

The format options.

Methods Detail

WriteStartTagHook(TagStruct)

Description copied from class: AbstractTextWriterVisitor

The hook to write the start tag, which is invoked just before the tag starts. The method overriding this method must invoke AbstractTextWriterVisitor.WriteStartTag(TagStruct) with the specified tag.

C#
protected override void WriteStartTagHook(in TagStruct tag)

Parameters

tag
TagStruct

WriteEndTagHook(TagStruct)

Description copied from class: AbstractTextWriterVisitor

The hook to write the end tag, which is invoked just before the tag ends. The method overriding this method must invoke AbstractTextWriterVisitor.WriteEndTag(TagStruct) with the specified tag.

C#
protected override void WriteEndTagHook(in TagStruct tag)

Parameters

tag
TagStruct

BeforeEmptyOrText()

Description copied from class: AbstractTextWriterVisitor

The hook called before the empty tag or the text node.

C#
protected override void BeforeEmptyOrText()