November Happy Hour will be moved to Thursday December 5th.

Class UrlFragment

Represents a link in content

Inheritance
System.Object
UrlFragment
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: 11.20.7
Syntax
public class UrlFragment : IStringFragment, IReferenceMap

Constructors

UrlFragment(String)

Initializes a new instance of the UrlFragment class.

Declaration
public UrlFragment(string url)
Parameters
Type Name Description
System.String url

The unencoded url.

UrlFragment(String, IUrlResolver)

Initializes a new instance of the UrlFragment class.

Declaration
public UrlFragment(string url, IUrlResolver urlResolver)
Parameters
Type Name Description
System.String url

The unencoded url.

IUrlResolver urlResolver

The URL resolver.

Properties

InternalFormat

Gets the internal format of the link, that is what is stored in db

Declaration
public string InternalFormat { get; }
Property Value
Type Description
System.String

The internal format.

Remarks

For a permanent link the internal format is a guid based link.

ReferencedPermanentLinkIds

Gets an System.Collections.Generic.IList<T> of permanent link ids that are referenced from this fragment.

Declaration
public IList<Guid> ReferencedPermanentLinkIds { get; }
Property Value
Type Description
System.Collections.Generic.IList<System.Guid>

An System.Collections.Generic.IList<T> of permanent link ids that are referenced from this fragment.

Url

Raw URL without any encoding applied

Declaration
public string Url { get; }
Property Value
Type Description
System.String

Methods

GetEditFormat()

Gets the link format for edit mode

Declaration
public string GetEditFormat()
Returns
Type Description
System.String

GetViewFormat()

Gets the link format for view mode

Declaration
public string GetViewFormat()
Returns
Type Description
System.String

RemapPermanentLinkReferences(IDictionary<Guid, Guid>)

Remaps permanent links according to the provided link mapping.

Declaration
public void RemapPermanentLinkReferences(IDictionary<Guid, Guid> idMap)
Parameters
Type Name Description
System.Collections.Generic.IDictionary<System.Guid, System.Guid> idMap

The link mapping.

Implements

Extension Methods