Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DebugInfo.cs
Go to the documentation of this file.
4
6
7internal sealed class DebugInfo
8{
9 private sealed class DebugInfoComparer : IComparer<DebugInfo>
10 {
12 {
13 if (d1.Index > d2.Index)
14 {
15 return 1;
16 }
17 if (d1.Index == d2.Index)
18 {
19 return 0;
20 }
21 return -1;
22 }
23 }
24
25 public int StartLine;
26
27 public int EndLine;
28
29 public int Index;
30
31 public string FileName;
32
33 public bool IsClear;
34
35 private static readonly DebugInfoComparer s_debugComparer = new DebugInfoComparer();
36
38 {
40 {
41 Index = index
42 };
44 if (num < 0)
45 {
46 num = ~num;
47 if (num == 0)
48 {
49 return null;
50 }
51 num--;
52 }
53 return debugInfos[num];
54 }
55
56 public override string ToString()
57 {
59 if (IsClear)
60 {
64 handler.AppendFormatted(Index);
65 handler.AppendLiteral(": clear");
66 return string.Create(provider, ref handler);
67 }
71 handler2.AppendFormatted(Index);
72 handler2.AppendLiteral(": [");
73 handler2.AppendFormatted(StartLine);
74 handler2.AppendLiteral("-");
75 handler2.AppendFormatted(EndLine);
76 handler2.AppendLiteral("] '");
77 handler2.AppendFormatted(FileName);
78 handler2.AppendLiteral("'");
79 return string.Create(provider2, ref handler2);
80 }
81}
static int BinarySearch(Array array, object? value)
Definition Array.cs:1320
static CultureInfo InvariantCulture
static readonly DebugInfoComparer s_debugComparer
Definition DebugInfo.cs:35
static DebugInfo GetMatchingDebugInfo(DebugInfo[] debugInfos, int index)
Definition DebugInfo.cs:37