Class PermanentLinkMap
A base class that provides the basic mapping between a System.Guid and a UriKind.Relative System.Uri (the MappedUrl).
Inherited Members
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 9.12.2Syntax
public class PermanentLinkMap
Remarks
An PermanentLinkMap has an permanent property which is a System.Guid, and one or more mapped properties that it maps to. The mapped properties may change, the immutable must never change.
Mapping is provided by instantiating an instance via a store lookup, and providing an appropriate parameter.
There are derived classes, PermanentPageLinkMap and PermanentFileLinkMap, representing the two different kinds of links supported. There's an PermanentLinkMapStore class which given a System.Guid or a System.Uri can get an PermanentXXXLinkMap instance, or null if not found.
Mapped defining property for PermanentPageLinkMap is a PageReference. Mapped defining property for PermanentFileLinkMap is a string (virtualPath).
The PermanentLinkMap instances should be considered as a required and persisted representation. This means that any time a new PermanentLinkMap is created in the system an PermanentXXXLinkMap object must be constructed (this is the only way to get the permanent Uri anyway), and any time an existing PermanentLinkMap has a mapped defining property changed, the corresponding property must be 'set' to enable persistence (actually to enable cache coherence).
Properties
Extension
Gets or sets the extension.
Declaration
protected string Extension { get; set; }
Property Value
Type | Description |
---|---|
System.String | The extension. |
Remarks
The extension is needed as an accessory to get appropriate mapping for IIS etc for the URL
Guid
Gets or sets the GUID.
Declaration
public Guid Guid { get; protected set; }
Property Value
Type | Description |
---|---|
System.Guid | The GUID. |
HasMappedUrl
Gets a value indicating whether this instance has mapped URL.
Declaration
public bool HasMappedUrl { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
HasPermanentLinkUrl
Gets a value indicating whether this instance has permanent link URL.
Declaration
public bool HasPermanentLinkUrl { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsMapped
Gets a value indicating whether this instance is successfully mapped.
Declaration
public bool IsMapped { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
MappedUrl
Gets or sets the mapped URL.
Declaration
public Uri MappedUrl { get; }
Property Value
Type | Description |
---|---|
System.Uri | The mapped URL. |
Remarks
The path is encoded in this representation. To use as a virtual path, decode with Uri.UnescapeDataString.
PermanentLinkUrl
Gets or sets the permanent link URL.
Declaration
public Uri PermanentLinkUrl { get; protected set; }
Property Value
Type | Description |
---|---|
System.Uri | The permanent link URL. It is always relative. |