Search Results for

    Show / Hide Table of Contents

    Interface IAbstractMarkupData

    Base interface for all tagged text content with markup that can appear inside the source or target in a localizable paragraph unit.

    Inherited Members
    System.ICloneable.Clone()
    ISupportsUniqueId.UniqueId
    Namespace: Sdl.FileTypeSupport.Framework.BilingualApi
    Assembly: Sdl.FileTypeSupport.Framework.Core.dll
    Syntax
    public interface IAbstractMarkupData : ICloneable, ISupportsUniqueId

    Properties

    IndexInParent

    The index of this item in its parent container (if any).

    Declaration
    int IndexInParent { get; }
    Property Value
    Type Description
    System.Int32
    Remarks

    This is equivalent to calling

    item.Parent.IndexOf(item)
    .

    If this item has no parent this property, -1 is returned.

    Parent

    When this item is inside a markup data container, this property provides access to the parent container.

    Declaration
    IAbstractMarkupDataContainer Parent { get; set; }
    Property Value
    Type Description
    IAbstractMarkupDataContainer
    Remarks

    This property is automatically set when the item is inserted into or removed from a container. API users should never need to set this property.

    Attempting to set this property to an invalid value (i.e. a container that does not contain this item, or setting it to null when the item is part of an existing collection) will cause an exception.

    ParentParagraph

    Convenient accessor to the source or target paragraph container that the item appears in.

    Declaration
    IParagraph ParentParagraph { get; }
    Property Value
    Type Description
    IParagraph
    Remarks

    This property is null if the item does not appear (directly or nested) inside a IParagraph.

    Methods

    AcceptVisitor(IMarkupDataVisitor)

    Part of the visitor pattern implementation for markup data.

    This method is overridden in each leaf implementation. The implementation should call the Visit... method on the visitor corresponding to their object type, passing themselves (i.e. this) as the parameter.

    Objects that contain other objects (e.g. implementations of ISegment or IOtherMarker) should NOT apply the visitor to their content items. It must be left to the visitor implementation to 'decide' whether the visitor 'wants' to visit the sub-items of a node.

    Declaration
    void AcceptVisitor(IMarkupDataVisitor visitor)
    Parameters
    Type Name Description
    IMarkupDataVisitor visitor
    Examples

    The ILocationMarker implementation of this interface looks as follows:

    void AcceptVisitor(IMarkupDataVisitor visitor)
    {
      visitor.VisitLocationMarker(this);
    }

    RemoveFromParent()

    Removes this node from its parent container (if any).

    Declaration
    void RemoveFromParent()
    Remarks

    If the item is not inside a parent container, nothing will happen.

    This is a convenience implementation that achieves the same result as calling

    item.Parent.Remove(item)
    .

    On this page

    • Properties
      • IndexInParent
      • Parent
      • ParentParagraph
    • Methods
      • AcceptVisitor(IMarkupDataVisitor)
      • RemoveFromParent()
    Back to top Generated by DocFX