Try our conversational search powered by Generative AI!

Class UrlFragmentHandler

Handles permanent link attribute fragments

Inheritance
System.Object
UrlFragmentHandler
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Core.Html.StringParsing
Assembly: EPiServer.dll
Version: 7.19.2
Syntax
public class UrlFragmentHandler : IFragmentAttributeHandler

Constructors

UrlFragmentHandler(ILinkAttributeMatch)

Initializes a new instance of the UrlFragmentHandler class.

Declaration
public UrlFragmentHandler(ILinkAttributeMatch linkAttributeMatcher)
Parameters
Type Name Description
ILinkAttributeMatch linkAttributeMatcher

The link attribute matcher.

UrlFragmentHandler(ILinkAttributeMatch, UrlResolver)

Initializes a new instance of the UrlFragmentHandler class.

Declaration
public UrlFragmentHandler(ILinkAttributeMatch linkAttributeMatcher, UrlResolver urlResolver)
Parameters
Type Name Description
ILinkAttributeMatch linkAttributeMatcher

The link attribute matcher.

UrlResolver urlResolver

The URL resolver.

Methods

Extracts the permanent link.

Declaration
protected void ExtractPermanentLink(FragmentParserContext context, AttributeFragment attribute, string permanentLink, string prefix, string suffix)
Parameters
Type Name Description
FragmentParserContext context

The context.

AttributeFragment attribute

The attribute.

System.String permanentLink

The permanent link.

System.String prefix

The prefix.

System.String suffix

The suffix.

ParseAttribute(FragmentParserContext, ElementFragment, AttributeFragment)

Parses the attribute of a fragment into a string fragment.

Declaration
public bool ParseAttribute(FragmentParserContext context, ElementFragment parentFragment, AttributeFragment attribute)
Parameters
Type Name Description
FragmentParserContext context

The current parser context that contains the source and where any results should be written.

ElementFragment parentFragment

The element fragment containing the attribute.

AttributeFragment attribute

The attribute that should be parsed.

Returns
Type Description
System.Boolean

true if the attribute was handled, otherwise false.

Evaluates a possible link

Declaration
protected virtual bool ParsePossibleLink(FragmentParserContext context, AttributeFragment attribute, string attributeValue, string prefix, string suffix)
Parameters
Type Name Description
FragmentParserContext context

The context.

AttributeFragment attribute

The attribute.

System.String attributeValue

The attribute value.

System.String prefix

The prefix.

System.String suffix

The suffix.

Returns
Type Description
System.Boolean

Implements

Extension Methods