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

Class ContentArea

Represents an structure that controls how Content are placed in an area.

Inheritance
System.Object
ContentArea
Implements
System.Runtime.Serialization.ISerializable
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public class ContentArea : XhtmlString, ISerializable, IReadOnly<XhtmlString>, IReadOnly<ContentArea>, IReadOnly, IReferenceMap
Remarks

This class is a container of string fragments each representing where a content is placed in the area.

Constructors

ContentArea()

Initializes a new empty instance of the ContentArea class.

Declaration
public ContentArea()

ContentArea(String)

Initializes a new instance of the ContentArea class with the passed value.

Declaration
public ContentArea(string unparsedString)
Parameters
Type Name Description
System.String unparsedString

The value that should be assigned to the new instace.

Properties

Count

Returns the number of content fragments found

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

FilteredItems

Gets the ContentAreaItems filtered by publish status, permissions and personalization.

Declaration
public virtual IEnumerable<ContentAreaItem> FilteredItems { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<ContentAreaItem>

FragmentFactory

Gets or sets the content fragment factory.

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

Items

Gets the items hosted by this ContentArea.

Declaration
public virtual IList<ContentAreaItem> Items { get; }
Property Value
Type Description
System.Collections.Generic.IList<ContentAreaItem>

MarkupGeneratorFactory

Gets or sets the content fragment factory.

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

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.

Tag

Gets or sets the tag for the Content Area.

Declaration
public string Tag { get; set; }
Property Value
Type Description
System.String

Methods

Copy()

Creates a deep copy of this instance.

Declaration
public ContentArea Copy()
Returns
Type Description
ContentArea

A copy of the current instance.

CreateStringFragments(String)

Creates a collection containing string fragments from the unparsed string.

Declaration
protected override StringFragmentCollection CreateStringFragments(string unparsedString)
Parameters
Type Name Description
System.String unparsedString

The unparsed XHTML string.

Returns
Type Description
StringFragmentCollection

A new StringFragmentCollection containing fragments from the provided string.

Overrides

CreateWritableClone()

Creates the writable clone.

Declaration
public ContentArea CreateWritableClone()
Returns
Type Description
ContentArea

CreateWriteableCloneImplementation()

Creates a writable deep clone of the current object.

Declaration
protected override XhtmlString CreateWriteableCloneImplementation()
Returns
Type Description
XhtmlString

A writable copy of the current instance.

Overrides

Filter(IPrincipal)

Gets the ContentAreaItems filtered by publish status, permissions and personalization.

Declaration
public virtual IEnumerable<ContentAreaItem> Filter(IPrincipal principal)
Parameters
Type Name Description
System.Security.Principal.IPrincipal principal

The principal for which the items are filtered

Returns
Type Description
System.Collections.Generic.IEnumerable<ContentAreaItem>

The filtered content area items.

MakeReadOnly()

Makes this instance read only.

Declaration
public override void MakeReadOnly()
Overrides
Remarks

It will also make its Fragments and ContentAreaItems readonly.

Move(Int32, Int32)

Moves a content from one position to another.

Declaration
public void Move(int oldIndex, int newIndex)
Parameters
Type Name Description
System.Int32 oldIndex

The old index. Start index is 0.

System.Int32 newIndex

The new index. Start index is 0.

RemapPermanentLinkReferences(IDictionary<Guid, Guid>)

Remaps permanent links according to the provided link mapping.

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

The link mapping.

Implements

System.Runtime.Serialization.ISerializable

Extension Methods