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

Class PropertyLinkCollection

Property representing an ordered list of links.

Inheritance
System.Object
PropertyLinkCollection
Implements
System.Runtime.Serialization.IDeserializationCallback
System.Collections.Generic.IEnumerable<LinkItem>
System.Collections.IEnumerable
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 PropertyLinkCollection : PropertyXhtmlString, IReadOnly<PropertyData>, IReadOnly, ILazyProperty, IReferenceMap, IPropertyPreferLoadData, IPersonalizedRoles, IDeserializationCallback, IEnumerable<LinkItem>, IEnumerable
Remarks

Do not work directly again the Fragments property since this might not always be in sync with the Links collection if this has been changed.

Constructors

PropertyLinkCollection()

Initializes a new instance of the PropertyLinkCollection class.

Declaration
public PropertyLinkCollection()

PropertyLinkCollection(LinkItemCollection)

Initializes a new instance of the PropertyLinkCollection class using the passed LinkItemCollection as value.

Declaration
public PropertyLinkCollection(LinkItemCollection linkItemCollection)
Parameters
Type Name Description
LinkItemCollection linkItemCollection

A LinkItemCollection which will be the value of the new PropertyLinkCollection.

Exceptions
Type Condition
System.ArgumentNullException

linkItemCollection is null.

Properties

IsModified

Check if property has been modified.

Declaration
public override bool IsModified { get; set; }
Property Value
Type Description
System.Boolean
Overrides

IsNull

Check for null property (no value has been set)

Declaration
public override bool IsNull { get; }
Property Value
Type Description
System.Boolean

Returns true if the Links is null or empty.

Overrides

LinkMapper

Gets or sets the fragment parser that should be used by the current instance.

Declaration
[Obsolete("Use UrlResolver Instead.")]
public Injected<IPermanentLinkMapper> LinkMapper { get; set; }
Property Value
Type Description
Injected<IPermanentLinkMapper>

Gets or sets the LinkItemCollection which represents the value of this property.

Declaration
public LinkItemCollection Links { get; set; }
Property Value
Type Description
LinkItemCollection

The LinkItemCollection to be assigned as value.

PropertyValueType

Gets the Type that represents the value type of this property.

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

Returns the LinkItemCollection type.

Overrides

Type

Gets the PropertyDataType enum value that represents the type of this property.

Declaration
public override PropertyDataType Type { get; }
Property Value
Type Description
PropertyDataType

Returns LinkCollection.

Overrides

UrlResolver

Gets or sets the URL resolver.

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

The URL resolver.

Value

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

Copy()

Creates a copy of this object.

Declaration
public override PropertyData Copy()
Returns
Type Description
PropertyData

A new PropertyData object.

Overrides

CreatePropertyControl()

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

Declaration
public override IPropertyControl CreatePropertyControl()
Returns
Type Description
IPropertyControl

An PropertyLinkCollectionControl 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 PropertyControlClassFactory.

CreateWritableClone()

Creates a writable clone of the property.

Declaration
public override PropertyData CreateWritableClone()
Returns
Type Description
PropertyData

A writable copy of the property.

Overrides

GetEnumerator()

Returns an enumerator that iterates through the collection of LinkItems.

Declaration
public IEnumerator<LinkItem> GetEnumerator()
Returns
Type Description
System.Collections.Generic.IEnumerator<LinkItem>

A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection.

LoadData(Object)

Loads the internal representation (exposed by Links and Value) from what is stored in the database. "Deserialize".

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

The serialized value stored in the database.

Overrides

MakeReadOnly()

Sets internal LinkItemCollection to read-only as well as calling the base class

Declaration
public override void MakeReadOnly()
Overrides

Parse(String)

Parses the specified string and creates a new PropertyLinkCollection.

Declaration
public static PropertyLinkCollection Parse(string stringToParse)
Parameters
Type Name Description
System.String stringToParse

The string to parse.

Returns
Type Description
PropertyLinkCollection

A new PropertyLinkCollection.

ParseToObject(String)

Returns a new PropertyLinkCollection based on the string value.

Declaration
public override PropertyData ParseToObject(string str)
Parameters
Type Name Description
System.String str

A string containing the serialized value of the property.

Returns
Type Description
PropertyData
Overrides

ParseToSelf(String)

Initializes the Links collection from the passed string representation.

Declaration
public override void ParseToSelf(string str)
Parameters
Type Name Description
System.String str

A string containing the serialized value of the property.

Overrides

RemapPermanentLinkReferences(IDictionary<Guid, Guid>)

Remaps permanent links according to the provided link mapping.

Declaration
public override void RemapPermanentLinkReferences(IDictionary<Guid, Guid> idMap)
Parameters
Type Name Description
System.Collections.Generic.IDictionary<System.Guid, System.Guid> idMap

The link mapping.

Overrides

SaveData(PropertyDataCollection)

Prepares the data in the Links property for storage in the database. "Serialize".

Declaration
public override object SaveData(PropertyDataCollection properties)
Parameters
Type Name Description
PropertyDataCollection properties
Returns
Type Description
System.Object
Overrides
Remarks

Returns with unresolved links

SetDefaultValue()

Sets the default value.

Declaration
protected override void SetDefaultValue()
Overrides

ToWebString()

The Xhtml string representation for view mode.

Declaration
public override string ToWebString()
Returns
Type Description
System.String

An unordered list of links

Overrides

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
System.Collections.IEnumerator

An System.Collections.IEnumerator object that can be used to iterate through the collection.

Implements

System.Runtime.Serialization.IDeserializationCallback
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

Extension Methods