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

Class ContentFragmentAttributeAssembler

Constructs client side edit activation attributes for ContentFragments.

Inheritance
System.Object
ContentFragmentAttributeAssembler
Inherited Members
System.Object.ToString()
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.Web
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
[ServiceConfiguration(typeof(ContentFragmentAttributeAssembler))]
public class ContentFragmentAttributeAssembler

Constructors

ContentFragmentAttributeAssembler(IObjectSerializerFactory, IContentRepository)

Initializes a new instance of the ContentFragmentAttributeAssembler class.

Declaration
[Obsolete("Use alternative constructor")]
public ContentFragmentAttributeAssembler(IObjectSerializerFactory serializerFactory, IContentRepository contentRepository)
Parameters
Type Name Description
IObjectSerializerFactory serializerFactory

The serializer factory. Used when serializing some attribute values into JSON

IContentRepository contentRepository

The content repository.

ContentFragmentAttributeAssembler(IObjectSerializerFactory, IContentAreaLoader)

Initializes a new instance of the ContentFragmentAttributeAssembler class.

Declaration
public ContentFragmentAttributeAssembler(IObjectSerializerFactory serializerFactory, IContentAreaLoader contentAreaLoader)
Parameters
Type Name Description
IObjectSerializerFactory serializerFactory

The serializer factory. Used when serializing some attribute values into JSON

IContentAreaLoader contentAreaLoader

The registered context area loader

Methods

AppendPersonalizationAttributes(IDictionary<String, String>, ContentAreaItem)

Appends the personalization attributes to the attributes collection.

Declaration
protected virtual void AppendPersonalizationAttributes(IDictionary<string, string> attributes, ContentAreaItem contentAreaItem)
Parameters
Type Name Description
System.Collections.Generic.IDictionary<System.String, System.String> attributes

The attribute collection to which the persionalization attibutes are appended.

ContentAreaItem contentAreaItem

The fragment to create personalization attributes for.

GetAttributes(ContentAreaItem, Boolean, Boolean)

Gets a dictionary containing markup attributes necessary for supporting editable ContentFragments in rendered markup.

Declaration
public virtual IDictionary<string, string> GetAttributes(ContentAreaItem contentAreaItem, bool isRenderedInEditMode, bool hasRenderer)
Parameters
Type Name Description
ContentAreaItem contentAreaItem

The fragment to assemble attributes for.

System.Boolean isRenderedInEditMode

set to true when the fragment is rendered in edit mode.

System.Boolean hasRenderer

A value stating whether a renderer exists for the fragment.

Returns
Type Description
System.Collections.Generic.IDictionary<System.String, System.String>

A dictionary with attribute names and values for a content fragment

Extension Methods