Class FileLineCharIndexSegment
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
beginFileLineCharIndexThe beginning position (inclusive).
endFileLineCharIndexThe ending position (exclusive).
FileLineCharIndexSegment(FileLineCharIndexSegment)
Initializes a new instance of the FileLineCharIndexSegment class by copying another instance.
public FileLineCharIndexSegment(FileLineCharIndexSegment src)
Parameters
srcFileLineCharIndexSegmentThe source to copy from.
FileLineCharIndexSegment(IIndexedFileLine)
public FileLineCharIndexSegment(IIndexedFileLine indexedFileLine)
Parameters
indexedFileLineIIndexedFileLine
Properties
Begin
Beginning position (inclusive).
public FileLineCharIndex Begin { get; set; }
Property Value
End
Ending position (exclusive).
public FileLineCharIndex End { get; set; }
Property Value
IsMultiLine
Whether the segment spans multiple lines.
public bool IsMultiLine { get; }
Property Value
Methods
Any()
Whether this segment contains any characters (End > Begin).
public bool Any()
Returns
Equals(FileLineCharIndexSegment)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(FileLineCharIndexSegment other)
Parameters
otherFileLineCharIndexSegmentAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current object.
Returns
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.