Table of Contents

Class FileLineCharIndexSegment

Namespace
Hi.Common.FileLines
Assembly
HiGeom.dll

Represents a character-level segment within file(s). Begin is inclusive, End is exclusive: [Begin, End).

public class FileLineCharIndexSegment : IEquatable<FileLineCharIndexSegment>
Inheritance
FileLineCharIndexSegment
Implements
Inherited Members
Extension Methods

Constructors

FileLineCharIndexSegment()

Initializes a new instance of the FileLineCharIndexSegment class.

public FileLineCharIndexSegment()

FileLineCharIndexSegment(FileLineCharIndex, FileLineCharIndex)

Initializes a new instance of the FileLineCharIndexSegment class with specified begin and end positions.

public FileLineCharIndexSegment(FileLineCharIndex begin, FileLineCharIndex end)

Parameters

begin FileLineCharIndex

The beginning position (inclusive).

end FileLineCharIndex

The ending position (exclusive).

FileLineCharIndexSegment(FileLineCharIndexSegment)

Initializes a new instance of the FileLineCharIndexSegment class by copying another instance.

public FileLineCharIndexSegment(FileLineCharIndexSegment src)

Parameters

src FileLineCharIndexSegment

The source to copy from.

FileLineCharIndexSegment(IIndexedFileLine)

public FileLineCharIndexSegment(IIndexedFileLine indexedFileLine)

Parameters

indexedFileLine IIndexedFileLine

Properties

Begin

Beginning position (inclusive).

public FileLineCharIndex Begin { get; set; }

Property Value

FileLineCharIndex

End

Ending position (exclusive).

public FileLineCharIndex End { get; set; }

Property Value

FileLineCharIndex

IsMultiLine

Whether the segment spans multiple lines.

public bool IsMultiLine { get; }

Property Value

bool

Methods

Any()

Whether this segment contains any characters (End > Begin).

public bool Any()

Returns

bool

Equals(FileLineCharIndexSegment)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(FileLineCharIndexSegment other)

Parameters

other FileLineCharIndexSegment

An object to compare with this object.

Returns

bool

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

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

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

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.