Try our conversational search powered by Generative AI!

Class NullUrlRewriteProvider

A RewriteProvider that does no actual rewrite but raises the corresponding events during parsing.

Inheritance
System.Object
NullUrlRewriteProvider
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
public class NullUrlRewriteProvider : UrlRewriteProvider

Constructors

NullUrlRewriteProvider()

Declaration
public NullUrlRewriteProvider()

Properties

IsIdKeep

Gets a value indicating whether this rewriter requires the use of the id query string parameter to pass through unchanged to and from the external format. Set this to true to indicate that a url rewritten to external actually uses id= and requires it to pass through any rewriting process unchanged.

Declaration
[Obsolete("The need for the ID keep functionality has been removed.")]
public override bool IsIdKeep { get; }
Property Value
Type Description
System.Boolean

false - Friendly URLs do not normally contain the id query string parameter

Overrides

Methods

ConvertToExternal(UrlBuilder, Object, Encoding)

Converts from internal, without regard to the context of internal/external URL.

Declaration
public override bool ConvertToExternal(UrlBuilder url, object internalObject, Encoding toEncoding)
Parameters
Type Name Description
UrlBuilder url

The URL to possibly rewrite

System.Object internalObject

An optional internal representation of the URL, typically a PageReference

System.Text.Encoding toEncoding

The current encoding

Returns
Type Description
System.Boolean

true if any modifications were made

Overrides
Remarks

When converting to external, we may need to change the encoding used for escaped characters in the URL to conform to response encoding requirements which may differ from the internally stored format - which should always be UTF-8.

ConvertToInternal(UrlBuilder, out Object)

Converts to internal, without regard to the context of internal/external URL.

Declaration
public override bool ConvertToInternal(UrlBuilder url, out object internalObject)
Parameters
Type Name Description
UrlBuilder url

The URL.

System.Object internalObject

An optional internal representation of the URL, typically a PageReference

Returns
Type Description
System.Boolean

true if any modifications were made

Overrides
Remarks

There is no support for changing encoding when converting to internal, since there is no requirement for this.

GetHtmlRewriter()

Get's an instance of a Html-rewriter to use when emitting HTML from EPiServer.

Declaration
public override HtmlRewriteToExternal GetHtmlRewriter()
Returns
Type Description
HtmlRewriteToExternal

A new instance of a HtmlRewriteToExternal-derived class that does absolutely nothing.

Overrides

Extension Methods