SourceFilePosition<TSelf, TFile> Class
Definition
A SourcePosition in a source code file.
public abstract class SourceFilePosition<TSelf, TFile> : SourcePosition<TSelf>, IEquatable<SourcePosition>, IEqualityOperators<SourcePosition, SourcePosition, Boolean>
where TSelf : SourceFilePosition<TSelf, TFile>
where TFile : SourceFile
Type Parameters
| Name | Description |
|---|---|
TSelf |
|
TFile |
Constructors
| Name | Description |
|---|---|
SourceFilePosition(TFile, Int32, Int32) |
Initialises a new instance of the SourceFilePosition<TSelf, TFile> class. |
Properties
| Name | Description |
|---|---|
EndIndex |
The exclusive end index of the position in the source file. |
File |
The SourceFile. |
Length |
The length of the position in the source file. |
StartIndex |
The inclusive start index of the position in the source file. |
Methods
| Name | Description |
|---|---|
Combine(TSelf) |
Combines two SourcePosition<TSelf>s to give a new SourcePosition that includes both this position and the other along any source in-between the two. |
CreateCombination(TSelf) |
Creates a combination of this SourceFilePosition<TSelf, TFile> and another. Used to create a combination for Combine(TSelf). |
Equals(SourcePosition) |
Indicates whether the current object is equal to another object of the same type. |
GetHashCode() |
Serves as the default hash function. |
Overlaps(SourceFilePosition<TSelf, TFile>) |
Returns true if two positions for the same file overlap. Zero length positions will overlap only if they are inside the other position. If they are at the start or end index of the other position they will not overlap. Two zero length positions never overlap. |
ToString() |
Returns a string that represents the current object. |