AbstractTextWriterVisitor Class

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

C#
public abstract class AbstractTextWriterVisitor : NodeVisitor
Inheritance
AbstractTextWriterVisitor
Derived
Implements

Constructors

AbstractTextWriterVisitor(TextWriter)

Initializes a new instance of the AbstractTextWriterVisitor class.

Methods

VisitEmptyTag(TagStruct)

Description copied from interface: NodeVisitor

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

VisitEntity(string)

Description copied from interface: NodeVisitor

Performs the operation on the entity node.

VisitTag(TagStruct)

Description copied from interface: NodeVisitor

Performs the operation on the Tag.

VisitText(string)

Description copied from interface: NodeVisitor

Performs the operation on the text node.

WriteStartTag(TagStruct)

Writes a start tag.

WriteEndTag(TagStruct)

Writes an end tag.

WriteStartTagHook(TagStruct)

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

WriteEndTagHook(TagStruct)

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

BeforeEmptyOrText()

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

Write(ReadOnlySpan<char>)

Writes characters into the text stream.

Write(string)

Writes a string into the text stream.

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

Constructors Detail

AbstractTextWriterVisitor(TextWriter)

Initializes a new instance of the AbstractTextWriterVisitor class.

C#
public AbstractTextWriterVisitor(TextWriter writer)

Parameters

writer
TextWriter

The text writer object for this visitor to output.

Methods Detail

VisitEmptyTag(TagStruct)

Description copied from interface: NodeVisitor

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

C#
public void VisitEmptyTag(in TagStruct tag)

Parameters

tag
TagStruct

Implements

VisitEntity(string)

Description copied from interface: NodeVisitor

Performs the operation on the entity node.

C#
public void VisitEntity(string text)

Parameters

text
string

Implements

VisitTag(TagStruct)

Description copied from interface: NodeVisitor

Performs the operation on the Tag.

C#
public void VisitTag(in TagStruct tag)

Parameters

tag
TagStruct

Implements

VisitText(string)

Description copied from interface: NodeVisitor

Performs the operation on the text node.

C#
public void VisitText(string text)

Parameters

text
string

Implements

WriteStartTag(TagStruct)

Writes a start tag.

C#
protected void WriteStartTag(in TagStruct tag)

Parameters

tag
TagStruct

The tag.

WriteEndTag(TagStruct)

Writes an end tag.

C#
protected void WriteEndTag(in TagStruct tag)

Parameters

tag
TagStruct

The tag.

WriteStartTagHook(TagStruct)

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

C#
protected abstract void WriteStartTagHook(in TagStruct tag)

Parameters

tag
TagStruct

The tag.

WriteEndTagHook(TagStruct)

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

C#
protected abstract void WriteEndTagHook(in TagStruct tag)

Parameters

tag
TagStruct

The tag.

BeforeEmptyOrText()

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

C#
protected virtual void BeforeEmptyOrText()

Write(ReadOnlySpan<char>)

Writes characters into the text stream.

C#
protected void Write(ReadOnlySpan<char> text)

Parameters

text
ReadOnlySpan<char>

A span.

Write(string)

Writes a string into the text stream.

C#
protected void Write(string text)

Parameters

text
string

A string.