Class TokenFragmentBase<T>
Abstract class for representing HTML fragments that can have token representation of the fragment name.
Inheritance
System.Object
TokenFragmentBase<T>
Inherited Members
Namespace: EPiServer.HtmlParsing
Assembly: EPiServer.Framework.dll
Version: 12.0.3Syntax
public abstract class TokenFragmentBase<T> : HtmlFragment where T : struct, ValueType
Type Parameters
Name | Description |
---|---|
T | An enum that lists the valid names for the fragment. |
Remarks
Used for ElementFragment and AttributeFragment to avoid expensive string comparisons, allowing element identification with a simple enum value comparison.
Constructors
TokenFragmentBase(HtmlFragmentType)
Declaration
protected TokenFragmentBase(HtmlFragmentType fragmentType)
Parameters
Type | Name | Description |
---|---|---|
HtmlFragmentType | fragmentType |
Fields
Tokens
Declaration
protected static StringToken<T> Tokens
Field Value
Type | Description |
---|---|
StringToken<T> |
Properties
Token
Declaration
public T Token { get; set; }
Property Value
Type | Description |
---|---|
T |
Methods
ParseNameToken(String, IHtmlParserContext)
Parses the name and sets the Token property.
Declaration
protected void ParseNameToken(string terminators, IHtmlParserContext context)
Parameters
Type | Name | Description |
---|---|---|
System.String | terminators | The terminators. |
IHtmlParserContext | context | The context. |