Search Results for

    Show / Hide Table of Contents

    Class SegmentRange

    A selection of content inside a Segment.

    Inheritance
    System.Object
    ExtensionDataContainer
    SegmentRange
    Inherited Members
    ExtensionDataContainer.ExtensionData
    Namespace: Sdl.Core.Bcm.BcmModel.Tokenization
    Assembly: Sdl.Core.Bcm.BcmModel.dll
    Syntax
    public class SegmentRange : ExtensionDataContainer

    Constructors

    SegmentRange()

    Initializes a new instance of the SegmentRange class.

    Declaration
    public SegmentRange()

    SegmentRange(SegmentPosition, SegmentPosition)

    Initializes a new instance with the provided positions.

    Declaration
    public SegmentRange(SegmentPosition from, SegmentPosition into)
    Parameters
    Type Name Description
    SegmentPosition from

    The start position.

    SegmentPosition into

    The end position.

    Remarks

    No checks are performed to verify that the start position precedes the end position.

    SegmentRange(Int32, Int32, Int32)

    Initializes a new instance of with the given parameters.

    Declaration
    public SegmentRange(int runIndex, int fromIndex, int intoIndex)
    Parameters
    Type Name Description
    System.Int32 runIndex

    The segment element index (run) of the range.

    System.Int32 fromIndex

    The start position in the run.

    System.Int32 intoIndex

    The end position (inclusive) in the run.

    Properties

    From

    Gets or sets the start SegmentPosition in the segment.

    Declaration
    public SegmentPosition From { get; set; }
    Property Value
    Type Description
    SegmentPosition

    The start SegmentPosition in the segment.

    Into

    Gets or sets the end SegmentPosition in the segment.

    Declaration
    public SegmentPosition Into { get; set; }
    Property Value
    Type Description
    SegmentPosition

    The end SegmentPosition in the segment.

    Methods

    Clone()

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

    Declaration
    public SegmentRange Clone()
    Returns
    Type Description
    SegmentRange

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

    Compare(SegmentRange, SegmentRange)

    Compares two segment ranges and returns a value indicating their order.

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

    The first of the two items to compare.

    SegmentRange b

    The second of the two items to compare.

    Returns
    Type Description
    System.Int32

    An integer value less than zero if a precedes b, zero if a and b are in the same range, and a value greater than zero if a follows b. Only the start positions are compared.

    Equals(SegmentRange)

    Compares the current range to another segment range.

    Declaration
    public bool Equals(SegmentRange other)
    Parameters
    Type Name Description
    SegmentRange other

    The range to compare with.

    Returns
    Type Description
    System.Boolean

    true if both ranges are identical.

    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.

    GetHashCode()

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

    ToString()

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

    A string representation of the object, for display purposes.

    On this page

    Back to top Generated by DocFX