Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SequencePoint.cs
Go to the documentation of this file.
4
6
7[DebuggerDisplay("{GetDebuggerDisplay(),nq}")]
8public readonly struct SequencePoint : IEquatable<SequencePoint>
9{
10 public const int HiddenLine = 16707566;
11
12 public DocumentHandle Document { get; }
13
14 public int Offset { get; }
15
16 public int StartLine { get; }
17
18 public int EndLine { get; }
19
20 public int StartColumn { get; }
21
22 public int EndColumn { get; }
23
24 public bool IsHidden => StartLine == 16707566;
25
26 internal SequencePoint(DocumentHandle document, int offset)
27 {
28 Document = document;
29 Offset = offset;
30 StartLine = 16707566;
31 StartColumn = 0;
32 EndLine = 16707566;
33 EndColumn = 0;
34 }
35
36 internal SequencePoint(DocumentHandle document, int offset, int startLine, ushort startColumn, int endLine, ushort endColumn)
37 {
38 Document = document;
39 Offset = offset;
40 StartLine = startLine;
41 StartColumn = startColumn;
42 EndLine = endLine;
43 EndColumn = endColumn;
44 }
45
50
51 public override bool Equals([NotNullWhen(true)] object? obj)
52 {
53 if (obj is SequencePoint other)
54 {
55 return Equals(other);
56 }
57 return false;
58 }
59
61 {
62 if (Document == other.Document && Offset == other.Offset && StartLine == other.StartLine && StartColumn == other.StartColumn && EndLine == other.EndLine)
63 {
64 return EndColumn == other.EndColumn;
65 }
66 return false;
67 }
68
69 private string GetDebuggerDisplay()
70 {
71 if (!IsHidden)
72 {
73 return $"{Offset}: ({StartLine}, {StartColumn}) - ({EndLine}, {EndColumn})";
74 }
75 return "<hidden>";
76 }
77}
static int Combine(int newKey, int currentKey)
Definition Hash.cs:11
Document(MetadataReader reader, DocumentHandle handle)
Definition Document.cs:19
SequencePoint(DocumentHandle document, int offset, int startLine, ushort startColumn, int endLine, ushort endColumn)
SequencePoint(DocumentHandle document, int offset)
override bool Equals([NotNullWhen(true)] object? obj)