Search Results for

    Show / Hide Table of Contents

    Class TagToken

    A Token representing a tag element.

    Inheritance
    object
    Token
    TagToken
    Implements
    ICloneable<Token>
    Inherited Members
    Token.Clone()
    Token.Text
    Token.Span
    object.GetType()
    object.MemberwiseClone()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Sdl.Core.Bcm.BcmModel.Tokenization.Tokens
    Assembly: Sdl.Core.Bcm.BcmModel.dll
    Syntax
    [DataContract]
    public class TagToken : Token, ICloneable<Token>

    Constructors

    TagToken()

    Initializes a new instance with default values (used for XML serialization only).

    Declaration
    public TagToken()

    TagToken(TagType, string, int, int, string, bool)

    Initializes a new instance of the Tag class with the specified type and anchor.

    Declaration
    public TagToken(TagType type, string tagId, int anchor, int alignmentAnchor, string textEquivalent, bool canHide)
    Parameters
    Type Name Description
    TagType type

    The tag type.

    string tagId

    The tag ID (user-defined)

    int anchor

    The tag anchor.

    int alignmentAnchor

    An alignment anchor (cross-segment), if available

    string textEquivalent

    A text equivalent string (ignored if the tag type is not TextPlaceholder or LockedContent)

    bool canHide

    True if the tag represents inline formatting, false otherwise

    Properties

    AlignmentAnchor

    Gets or sets the alignment anchor, which is used to align cross-segment tags. It only needs to be set for the start tag.

    Declaration
    [DataMember(Name = "alignmentAnchor")]
    public int? AlignmentAnchor { get; }
    Property Value
    Type Description
    int?

    Anchor

    Gets or sets the tag anchor, which is used to bracket two tags (connect start and end tag). The anchor is only relevant for start and end tags and has no cross-segment semantics.

    Declaration
    [DataMember(Name = "anchor")]
    public int? Anchor { get; set; }
    Property Value
    Type Description
    int?

    CanHide

    Gets or sets the CanHide flag

    Declaration
    [DataMember(Name = "canHide")]
    public bool? CanHide { get; set; }
    Property Value
    Type Description
    bool?

    TagId

    Gets or sets the tag ID which is a cross-format ID assigned by the filters and which may be used to represent a cross-format formatting class (such as "bold").

    Declaration
    [DataMember(Name = "tagId")]
    public string TagId { get; set; }
    Property Value
    Type Description
    string

    TagType

    Gets or sets the tag type.

    Declaration
    [DataMember(Name = "tagType")]
    public TagType TagType { get; set; }
    Property Value
    Type Description
    TagType

    TextEquivalent

    Gets or sets the text equivalent string. This will only be valid for text placeholder tags.

    Declaration
    [DataMember(Name = "textEquivalent")]
    public string TextEquivalent { get; set; }
    Property Value
    Type Description
    string

    Type

    Gets the type of Token.

    Declaration
    [DataMember(Name = "type")]
    protected override string Type { get; }
    Property Value
    Type Description
    string

    The type.

    Overrides
    Token.Type

    Methods

    ToString()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of the object, for display purposes.

    Overrides
    Token.ToString()

    Implements

    ICloneable<T>

    See Also

    Token
    In this article
    Back to top Generated by DocFX