Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AppendSuffix()

string System.Diagnostics.Activity.AppendSuffix ( string parentId,
string suffix,
char delimiter )
inlineprivate

Definition at line 1100 of file Activity.cs.

1101 {
1102 if (parentId.Length + suffix.Length < 1024)
1103 {
1104 return parentId + suffix + delimiter;
1105 }
1106 int num = 1015;
1107 while (num > 1 && parentId[num - 1] != '.' && parentId[num - 1] != '_')
1108 {
1109 num--;
1110 }
1111 if (num == 1)
1112 {
1113 return GenerateRootId();
1114 }
1115 string text = ((int)GetRandomNumber()).ToString("x8");
1116 return parentId.Substring(0, num) + text + "#";
1117 }
static unsafe long GetRandomNumber()
Definition Activity.cs:1119
static string GenerateRootId()
Definition Activity.cs:1187

References System.Diagnostics.Activity.GenerateRootId(), System.Diagnostics.Activity.GetRandomNumber(), System.suffix, System.text, and System.ToString.

Referenced by System.Diagnostics.Activity.GenerateHierarchicalId().