AbstractTextWriterVisitor Class
The abstract visitor implementaion to write the HTML document into text.
public abstract class AbstractTextWriterVisitor : NodeVisitor
- Inheritance
-
Abstract
Text Writer Visitor
- Derived
- Implements
Constructors
Abstract |
Initializes a new instance of the AbstractTextWriterVisitor class. |
Methods
Visit |
Description copied from interface: NodeVisitor
|
Visit |
Description copied from interface: NodeVisitor
|
Visit |
Description copied from interface: NodeVisitor
|
Visit |
Description copied from interface: NodeVisitor
|
Write |
Writes a start tag. |
Write |
Writes an end tag. |
Write |
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. |
Write |
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. |
Before |
The hook called before the empty tag or the text node. |
Write(Read |
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.
public AbstractTextWriterVisitor(TextWriter writer)
Parameters
- writer
-
Text
Writer
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.
public void VisitEmptyTag(in TagStruct tag)
Parameters
- tag
-
Tag
Struct
Implements
VisitEntity(string)
Description copied from interface: NodeVisitor
Performs the operation on the entity node.
public void VisitEntity(string text)
Parameters
- text
- string
Implements
VisitTag(TagStruct)
Description copied from interface: NodeVisitor
Performs the operation on the Tag.
public void VisitTag(in TagStruct tag)
Parameters
- tag
-
Tag
Struct
Implements
VisitText(string)
Description copied from interface: NodeVisitor
Performs the operation on the text node.
public void VisitText(string text)
Parameters
- text
- string
Implements
WriteStartTag(TagStruct)
Writes a start tag.
protected void WriteStartTag(in TagStruct tag)
Parameters
- tag
-
Tag
Struct
The tag.
WriteEndTag(TagStruct)
Writes an end tag.
protected void WriteEndTag(in TagStruct tag)
Parameters
- tag
-
Tag
Struct
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.
protected abstract void WriteStartTagHook(in TagStruct tag)
Parameters
- tag
-
Tag
Struct
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.
protected abstract void WriteEndTagHook(in TagStruct tag)
Parameters
- tag
-
Tag
Struct
The tag.
BeforeEmptyOrText()
The hook called before the empty tag or the text node.
protected virtual void BeforeEmptyOrText()
Write(ReadOnlySpan<char>)
Writes characters into the text stream.
protected void Write(ReadOnlySpan<char> text)
Parameters
- text
-
Read
Only <char>Span
A span.
Write(string)
Writes a string into the text stream.
protected void Write(string text)
Parameters
- text
- string
A string.