Search Results for

    Show / Hide Table of Contents

    Class SegmentPosition

    Represents a position within a segment.

    Inheritance
    object
    SegmentPosition
    Inherited Members
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.Core
    Assembly: Sdl.LanguagePlatform.Core.dll
    Syntax
    [DataContract]
    public class SegmentPosition

    Constructors

    SegmentPosition()

    Initializes a new instance with default values.

    Declaration
    public SegmentPosition()

    SegmentPosition(int, int)

    Initializes a new instance with the specified arguments.

    Declaration
    public SegmentPosition(int runIndex, int positionInRun)
    Parameters
    Type Name Description
    int runIndex

    The index of the segment element within the segment.

    int positionInRun

    The position within the run. This is only relevant for Text elements, and has no effect for other segment element types.

    Properties

    Index

    Gets or sets the index of the run (segment element) within the segment.

    Declaration
    [DataMember]
    public int Index { get; set; }
    Property Value
    Type Description
    int

    Position

    Gets or sets the position within the subsegment. The value is ignored if the indicated segment run is not a Text run.

    Declaration
    [DataMember]
    public int Position { get; set; }
    Property Value
    Type Description
    int

    Methods

    Compare(SegmentPosition, SegmentPosition)

    Compares two segment positions and returns an indication of their sort order.

    Declaration
    public static int Compare(SegmentPosition a, SegmentPosition b)
    Parameters
    Type Name Description
    SegmentPosition a

    The first of the two items to compare.

    SegmentPosition b

    The second of the two items to compare.

    Returns
    Type Description
    int

    An int value less than zero if a precedes b, zero if a denotes the same position as b, and greater than zero if a follows b.

    Duplicate()

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

    Declaration
    public SegmentPosition Duplicate()
    Returns
    Type Description
    SegmentPosition

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

    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
    bool

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

    Overrides
    object.Equals(object)

    GetHashCode()

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for this object

    Overrides
    object.GetHashCode()

    ToString()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of the object, for display purposes.

    Overrides
    object.ToString()
    In this article
    • Constructors
      • SegmentPosition()
      • SegmentPosition(int, int)
    • Properties
      • Index
      • Position
    • Methods
      • Compare(SegmentPosition, SegmentPosition)
      • Duplicate()
      • Equals(object)
      • GetHashCode()
      • ToString()
    Back to top Generated by DocFX