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

Class PropertyUrl

Property that specifies a url.

Inheritance
System.Object
PropertyUrl
Namespace: EPiServer.SpecializedProperties
Assembly: EPiServer.dll
Version: 12.0.3
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<> 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<> 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.

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