Class FragmentHandlerHelper
Helper class for fragment handlers
Inheritance
System.Object
FragmentHandlerHelper
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.Core.Html.StringParsing
Assembly: EPiServer.dll
Version: 9.12.2Syntax
public static class FragmentHandlerHelper
Fields
ClassIdAttributeName
Declaration
public static readonly string ClassIdAttributeName
Field Value
Type | Description |
---|---|
System.String |
ContentGroupAttributeName
Declaration
public static readonly string ContentGroupAttributeName
Field Value
Type | Description |
---|---|
System.String |
GroupsAttributeName
Declaration
public static readonly string GroupsAttributeName
Field Value
Type | Description |
---|---|
System.String |
Methods
AttributeValueWithFallback(ElementFragment, String, String, Boolean)
Gets the attribute, with fallback to legacy
Declaration
public static string AttributeValueWithFallback(ElementFragment element, string dataName, string legacyName, bool required)
Parameters
Type | Name | Description |
---|---|---|
ElementFragment | element | The element. |
System.String | dataName | The name. |
System.String | legacyName | The legacy name. |
System.Boolean | required | if set to |
Returns
Type | Description |
---|---|
System.String |
AttributeWithFallback(ElementFragment, String, String)
Gets the attribute, with fallback to legacy
Declaration
public static AttributeFragment AttributeWithFallback(ElementFragment element, string dataName, string legacyName)
Parameters
Type | Name | Description |
---|---|---|
ElementFragment | element | The element. |
System.String | dataName | The name. |
System.String | legacyName | The legacy name. |
Returns
Type | Description |
---|---|
AttributeFragment |
ContainsClassId(ElementFragment, Guid)
Declaration
public static bool ContainsClassId(ElementFragment element, Guid compareValue)
Parameters
Type | Name | Description |
---|---|---|
ElementFragment | element | |
System.Guid | compareValue |
Returns
Type | Description |
---|---|
System.Boolean |
GetContentGroup(ElementFragment)
Gets the visitor content group.
Declaration
public static AttributeFragment GetContentGroup(ElementFragment element)
Parameters
Type | Name | Description |
---|---|---|
ElementFragment | element | The element. |
Returns
Type | Description |
---|---|
AttributeFragment |
GetGroups(ElementFragment)
Gets the visitor groups.
Declaration
public static AttributeFragment GetGroups(ElementFragment element)
Parameters
Type | Name | Description |
---|---|---|
ElementFragment | element | The element. |
Returns
Type | Description |
---|---|
AttributeFragment |
HtmlDecodeAttributeValue(String)
Helper method that reverts HttpUtility.HtmlAttributeEncode.
Declaration
public static string HtmlDecodeAttributeValue(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The attribute value. |
Returns
Type | Description |
---|---|
System.String | The decoded attribute value. |
SkipToNext(ElementFragment, IEnumerator<HtmlFragment>)
Declaration
public static void SkipToNext(ElementFragment element, IEnumerator<HtmlFragment> fragments)
Parameters
Type | Name | Description |
---|---|---|
ElementFragment | element | |
System.Collections.Generic.IEnumerator<HtmlFragment> | fragments |