Don't miss out Virtual Happy Hour today (April 26).

Try our conversational search powered by Generative AI!

Class PropertyUrl

Property that specifies a url.

Inheritance
System.Object
PropertyUrl
Inherited Members
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.SpecializedProperties
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
[PropertyDefinitionTypePlugIn]
public class PropertyUrl : PropertyString, IReadOnly<PropertyData>, IReadOnly, IReferenceMap

Constructors

PropertyUrl()

Declaration
public PropertyUrl()

Properties

LinkEditorType

Gets the specific link type for a URL.

Declaration
public virtual int LinkEditorType { get; }
Property Value
Type Description
System.Int32

The specific link type for a URL.

Remarks

The link editor type for a URL is 130.

LinkResolver

Gets or sets the URL resolver.

Declaration
public Injected<IUrlResolver> LinkResolver { get; set; }
Property Value
Type Description
Injected<IUrlResolver>

The URL resolver.

PropertyValueType

Gets the type of the property value, in this case Url.

Declaration
public override Type PropertyValueType { get; }
Property Value
Type Description
System.Type

The type of the property value.

Overrides

ReferencedPermanentLinkIds

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

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 property.

String

Gets or sets the string value.

Declaration
protected override string String { get; set; }
Property Value
Type Description
System.String

The string value.

Overrides

Url

Gets or sets the URL.

Declaration
public Url Url { get; set; }
Property Value
Type Description
Url

The URL.

Remarks

To change the URL, create a new Url instance and set the property.

Value

Gets or sets the value of the property.

Declaration
public override object Value { get; set; }
Property Value
Type Description
System.Object

The value of the property.

Overrides
Remarks

Value returns null if the property has no value defined.

Methods

LoadData(Object)

Sets the internal representation from what is stored in the database. "Deserialize"

Declaration
public override void LoadData(object value)
Parameters
Type Name Description
System.Object value

The value.

Overrides
Remarks

Set the value to the unresolved link value.

MakeReadOnly()

Override to avoid the base class referring to our Value property to avoid dead-lock when this happens indirectly via DataFactory.

Declaration
public override void MakeReadOnly()
Overrides

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.

SaveData(PropertyDataCollection)

Get the data representation suitable for storing to the database.

Declaration
public override object SaveData(PropertyDataCollection properties)
Parameters
Type Name Description
PropertyDataCollection properties

The properties for the current page.

Returns
Type Description
System.Object

A string representation of the value that should be saved.

Overrides
Remarks

Returns the unresolved link.

ToRawString()

Gets the string representation of the "raw" data as it is represented externally in the database and in export packages.

Declaration
[Obsolete("Method will no longer be called on Export. See EPiServer.Core.Transfer.Internal.PropertyUrlTransform class for equivalent functionality.")]
public override string ToRawString()
Returns
Type Description
System.String

external string representation of property value

Overrides
Remarks

Override this method in derived classes that presents a different view of the data than what is actually stored internally. Access level is 'internal' to avoid public exposure of the internal data format

ValidateUri(Uri)

Validates the URI before saving.

Declaration
protected virtual void ValidateUri(Uri uri)
Parameters
Type Name Description
System.Uri uri

The URI.

Remarks

In order to abort the saving, this method should throw an System.Exception.

Implements

Extension Methods

EPiServer.Core.PropertyDataExtensions.TranslateDisplayName(EPiServer.Core.PropertyData)
EPiServer.Core.PropertyDataExtensions.TranslateDescription(EPiServer.Core.PropertyData)