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

Class PropertyList<T>

NOTE: This is a pre-release API that is UNSTABLE and might not satisfy the compatibility requirements as denoted by its associated normal version. Base class intended to be used for list properties with custom item types.

Inheritance
System.Object
PropertyList<T>
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.Core
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
public abstract class PropertyList<T> : PropertyJson, IReadOnly<PropertyData>, IReadOnly, ILazyProperty
Type Parameters
Name Description
T

Constructors

PropertyList()

Initializes a new instance of the PropertyList<T> class.

Declaration
protected PropertyList()

PropertyList(IEnumerable<T>)

Initializes a new instance of the PropertyList<T> class with the provided list.

Declaration
protected PropertyList(IEnumerable<T> list)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> list

Properties

IsModified

Check if property has been modified.

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

true if this instance is modified; otherwise, false.

Overrides

IsNull

Check for null property (no value has been set).

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

true if this property is null; otherwise, false.

Overrides

ItemComparer

Gets the comparer that should be used to verify if items in the list unchanged after list has been altered. Replace if specific comparison is needed.

Declaration
protected virtual IEqualityComparer<T> ItemComparer { get; }
Property Value
Type Description
System.Collections.Generic.IEqualityComparer<T>

List

Gets or sets the list value of this property.

Declaration
public virtual IList<T> List { get; set; }
Property Value
Type Description
System.Collections.Generic.IList<T>

PropertyValueType

Gets the System.Type of the property value.

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

The System.Type of the property value.

Overrides

StringRepresentationSeparator

Gets the separator char that should be used when creating the string representation of this list.

Declaration
protected virtual char StringRepresentationSeparator { get; }
Property Value
Type Description
System.Char

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

Copy()

Creates a copy of this object.

Declaration
public override PropertyData Copy()
Returns
Type Description
PropertyData

A PropertyData object.

Overrides

CreateWritableClone()

Creates a writable clone of the property.

Declaration
public override PropertyData CreateWritableClone()
Returns
Type Description
PropertyData

A writable copy of the property.

Overrides

MakeReadOnly()

Convert this property to ReadOnly

Declaration
public override void MakeReadOnly()
Overrides
Remarks

Implementors should override this method when exposing complex objects that should be read-only as well.

ParseItem(String)

Parses a string into an item of the list item type T. String is checked for null or empty values before called.

Declaration
protected abstract T ParseItem(string value)
Parameters
Type Name Description
System.String value

The string value that should be parsed.

Returns
Type Description
T
Remarks

This method should mirror the output of the ToString method of the type. Used for default value handling.

ParseToSelf(String)

Sets the value of the property from a string representation.

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

The string value to parse.

Overrides

SetDefaultValue()

Sets the default value for this property.

Declaration
protected override void SetDefaultValue()
Overrides

ToString()

Get the property's values display string.

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

Implements

Extension Methods