Class TagToken
A Token which encapsulates a tag in the input.
Inherited Members
Namespace: Sdl.LanguagePlatform.Core.Tokenization
Assembly: Sdl.LanguagePlatform.Core.dll
Syntax
public class TagToken : Token
Constructors
TagToken()
Initializes a new instance with default values.
Declaration
public TagToken()
TagToken(Tag)
Initializes a new instance with the specified tag.
Declaration
public TagToken(Tag tag)
Parameters
Type | Name | Description |
---|---|---|
Tag | tag | The tag (must not be null) |
TagToken(TagToken)
Initializes a new instance from another instance, creating a deep copy
Declaration
public TagToken(TagToken other)
Parameters
Type | Name | Description |
---|---|---|
TagToken | other |
Properties
IsPlaceable
IsPlaceable. Always true
for this class.
Declaration
public override bool IsPlaceable { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
IsSubstitutable
IsSubstitutable. Always true
for this class.
Declaration
public override bool IsSubstitutable { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Overrides
Tag
Gets or sets the tag encapsulated in this instance.
Declaration
public Tag Tag { get; set; }
Property Value
Type | Description |
---|---|
Tag |
Methods
AcceptSegmentElementVisitor(ISegmentElementVisitor)
Visitor pattern implementation. Calls VisitTagToken(TagToken).
Declaration
public override void AcceptSegmentElementVisitor(ISegmentElementVisitor visitor)
Parameters
Type | Name | Description |
---|---|---|
ISegmentElementVisitor | visitor | The visitor instance |
Overrides
Duplicate()
See Duplicate()
Declaration
public override SegmentElement Duplicate()
Returns
Type | Description |
---|---|
SegmentElement | A new instance that is a deep copy of this instance. |
Overrides
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified object is equal to the current object; otherwise, false. |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
Overrides
GetTokenType()
Declaration
protected override TokenType GetTokenType()
Returns
Type | Description |
---|---|
TokenType |
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string representation of the object, for display purposes. |
Overrides
UpdateValue(TagToken)
Updates the token's value, using the values of another instance.
Declaration
public void UpdateValue(TagToken blueprint)
Parameters
Type | Name | Description |
---|---|---|
TagToken | blueprint | The instance to update this instance from. |
UpdateValue(TagToken, Boolean)
Updates the token's value, using the values of another instance.
Declaration
public void UpdateValue(TagToken blueprint, bool updateValuesOnly)
Parameters
Type | Name | Description |
---|---|---|
TagToken | blueprint | The instance to update this instance from. |
System.Boolean | updateValuesOnly | If true, only the tag's values are updated. Otherwise, all other information (such as the text) will be updated as well. |