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

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: 9.12.2
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.

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.

UrlResolver

Gets or sets the URL resolver.

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

The URL resolver.

Value

Gets or sets the value of the property, in this case a Url.

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.

NOTE: The type of the returned value is different when running in compatibility mode according to the LegacyPropertyValueType flag of OperationCompatibility

Methods

CreatePropertyControl()

Creates an IPropertyControl that is used to display a user interface for the property.

Declaration
public override IPropertyControl CreatePropertyControl()
Returns
Type Description
IPropertyControl

An IPropertyControl that is used to display a user interface for the property.

Overrides
Remarks

It is possible to change which control should be used by registering a different IPropertyControl for the PropertyData class in EPiServer.Core.PropertyControlClassFactory.

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