DefaultTextWriterVisitor Class

The default visitor implementaion to write the HTML document into text.

C#
public sealed class DefaultTextWriterVisitor : AbstractTextWriterVisitor
Inheritance
DefaultTextWriterVisitor
Implements

Constructors

DefaultTextWriterVisitor(TextWriter)

Initializes a new instance of the DefaultTextWriterVisitor class.

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.

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

DefaultTextWriterVisitor(TextWriter)

Initializes a new instance of the DefaultTextWriterVisitor class.

C#
public DefaultTextWriterVisitor(TextWriter writer)

Parameters

writer
TextWriter

The text writer object for this visitor to output.

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