Search Results for

    Show / Hide Table of Contents

    Class SegmentPosition

    Represents a position within a segment.

    Inheritance
    System.Object
    SegmentPosition
    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.Core
    Assembly: Sdl.LanguagePlatform.Core.dll
    Syntax
    public class SegmentPosition

    Constructors

    SegmentPosition()

    Initializes a new instance with default values.

    Declaration
    public SegmentPosition()

    SegmentPosition(Int32, Int32)

    Initializes a new instance with the specified arguments.

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

    The index of the segment element within the segment.

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

    Position

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

    Declaration
    public int Position { get; set; }
    Property Value
    Type Description
    System.Int32

    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
    System.Int32

    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
    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
    System.Object.Equals(System.Object)

    GetHashCode()

    System.Object.GetHashCode()
    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    A hash code for this object

    Overrides
    System.Object.GetHashCode()

    ToString()

    System.Object.ToString()
    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A string representation of the object, for display purposes.

    Overrides
    System.Object.ToString()

    On this page

    • Constructors
      • SegmentPosition()
      • SegmentPosition(Int32, Int32)
    • Properties
      • Index
      • Position
    • Methods
      • Compare(SegmentPosition, SegmentPosition)
      • Duplicate()
      • Equals(Object)
      • GetHashCode()
      • ToString()
    Back to top Generated by DocFX