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

◆ Format() [19/19]

static object System.Net.NetEventSource.Format ( object value)
inlinestatic

Definition at line 180 of file NetEventSource.cs.

181 {
182 if (value == null)
183 {
184 return "(null)";
185 }
186 string text = null;
187 if (text != null)
188 {
189 return text;
190 }
191 if (value is Array array)
192 {
193 return $"{array.GetType().GetElementType()}[{((Array)value).Length}]";
194 }
196 {
197 return $"{collection.GetType().Name}({collection.Count})";
198 }
199 if (value is SafeHandle safeHandle)
200 {
201 return $"{safeHandle.GetType().Name}:{safeHandle.GetHashCode()}(0x{safeHandle.DangerousGetHandle():X})";
202 }
203 if (value is IntPtr)
204 {
205 return $"0x{value:X}";
206 }
207 string text2 = value.ToString();
208 if (text2 == null || text2 == value.GetType().FullName)
209 {
210 return IdOf(value);
211 }
212 return value;
213 }
static string IdOf(object value)

References System.array, System.collection, System.Net.NetEventSource.IdOf(), System.text, and System.value.