Class UrlFragment
Represents a link in content
Inheritance
System.Object
UrlFragment
Namespace: EPiServer.Core.Html.StringParsing
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public class UrlFragment : Object, 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<> 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<> 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. |