Search Results for

    Show / Hide Table of Contents

    Class Tag

    Represents a tag.

    Inheritance
    Object
    SegmentElement
    Tag
    Inherited Members
    SegmentElement.GetSimilarity(SegmentElement)
    SegmentElement.GetSimilarity(SegmentElement, Boolean)
    SegmentElement.GetSimilarityAsync(SegmentElement)
    SegmentElement.GetSimilarityAsync(SegmentElement, Boolean)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.Core
    Assembly: Sdl.LanguagePlatform.Core.dll
    Syntax
    public class Tag : SegmentElement

    Constructors

    Tag()

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

    Declaration
    public Tag()

    Tag(Tag)

    Initializes a new instance of the Tag class from another instance.

    Declaration
    public Tag(Tag other)
    Parameters
    Type Name Description
    Tag other

    The other instance.

    Tag(TagType, String, Int32)

    Initializes a new instance of the Tag class with the specified type and anchor. The alignment anchor will be set to zero.

    Declaration
    public Tag(TagType type, string tagId, int anchor)
    Parameters
    Type Name Description
    TagType type

    The tag type.

    String tagId

    The tag ID (user-defined)

    Int32 anchor

    The tag anchor.

    Tag(TagType, String, Int32, Int32, String)

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

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

    The tag type.

    String tagId

    The tag ID (user-defined)

    Int32 anchor

    The tag anchor.

    Int32 alignmentAnchor

    An alignment anchor (cross-segment), if available

    String textEquivalent

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

    Tag(TagType, String, Int32, Int32, String, Boolean)

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

    Declaration
    public Tag(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)

    Int32 anchor

    The tag anchor.

    Int32 alignmentAnchor

    An alignment anchor (cross-segment), if available

    String textEquivalent

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

    Boolean 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
    public int AlignmentAnchor { get; set; }
    Property Value
    Type Description
    Int32

    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
    public int Anchor { get; set; }
    Property Value
    Type Description
    Int32

    CanHide

    Gets or sets the CanHide flag

    Declaration
    public bool CanHide { get; set; }
    Property Value
    Type Description
    Boolean

    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
    public string TagID { get; set; }
    Property Value
    Type Description
    String

    TextEquivalent

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

    Declaration
    public string TextEquivalent { get; set; }
    Property Value
    Type Description
    String

    Type

    Gets or sets the tag type.

    Declaration
    public TagType Type { get; set; }
    Property Value
    Type Description
    TagType

    Methods

    AcceptSegmentElementVisitor(ISegmentElementVisitor)

    Visitor pattern implementation. Calls VisitTag(Tag).

    Declaration
    public override void AcceptSegmentElementVisitor(ISegmentElementVisitor visitor)
    Parameters
    Type Name Description
    ISegmentElementVisitor visitor

    The visitor instance

    Overrides
    SegmentElement.AcceptSegmentElementVisitor(ISegmentElementVisitor)

    Duplicate()

    See Duplicate()

    Declaration
    public override SegmentElement Duplicate()
    Returns
    Type Description
    SegmentElement

    A new instance that is a deep copy of this instance.

    Overrides
    SegmentElement.Duplicate()

    Equals(Object)

    System.Object.Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj

    The object to compare with the current object.

    Returns
    Type Description
    Boolean

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    System.Object.Equals(System.Object)

    GetHashCode()

    System.Object.GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code for this object

    Overrides
    System.Object.GetHashCode()

    GetWeakHashCode()

    See GetWeakHashCode()

    Declaration
    public override int GetWeakHashCode()
    Returns
    Type Description
    Int32

    A hash code independent of tag anchors.

    Overrides
    SegmentElement.GetWeakHashCode()

    SeriliazedWihoutAnchor()

    Same as ToString, but doesn't includes _AlignmentAnchor

    Declaration
    public string SeriliazedWihoutAnchor()
    Returns
    Type Description
    String

    ToString()

    System.Object.ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string representation of the object, for display purposes.

    Overrides
    System.Object.ToString()
    In this article
    Back to top Generated by DocFX