Class HtmlRewritePipe
Parses a HTML source stream and raise appropriate events enabling rewriting and modification.
Inherited Members
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class HtmlRewritePipe : RewritePipe
Constructors
HtmlRewritePipe(Object, Encoding)
Initializes a new instance of the HtmlRewritePipe class.
Declaration
public HtmlRewritePipe(object context, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
System.Object | context | The context passed to event handlers |
System.Text.Encoding | encoding | The encoding to be used for URI escaping, and inital PI if included |
Remarks
Note that the encoding is only intended to control how URIs are escaped, and what is written in the initial PI - it does not control the actual encoding of the input or output character streams. This is controlled by the respective TextReader and TextWriter provided to the RewriteToEnd() method.
Properties
CaseFolding
Gets or sets the case folding to use when parsing source stream.
Declaration
public CaseFolding CaseFolding { get; set; }
Property Value
Type | Description |
---|---|
CaseFolding | The case folding. |
Context
The opaque context provided via the constructor
Declaration
public object Context { get; }
Property Value
Type | Description |
---|---|
System.Object |
Source
Gets and sets the source Stream to use
Declaration
protected Stream Source { get; set; }
Property Value
Type | Description |
---|---|
System.IO.Stream |
Methods
GetElementType(String)
Gets the type of the element.
Declaration
protected static HtmlRewritePipe.SpecialElementType GetElementType(string elementTypeName)
Parameters
Type | Name | Description |
---|---|---|
System.String | elementTypeName | Name of the element type. |
Returns
Type | Description |
---|---|
HtmlRewritePipe.SpecialElementType | The HtmlRewritePipe.SpecialElementType enumeration value for this element name |
RewriteToEnd(TextReader, TextWriter)
Rewrites the source stream to the end, sending the result to the writer.
Declaration
public virtual void RewriteToEnd(TextReader reader, TextWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | reader | |
System.IO.TextWriter | writer |