Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SR.cs
Go to the documentation of this file.
3
4namespace System;
5
6internal static class SR
7{
8 private static readonly bool s_usingResourceKeys = AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out var isEnabled) && isEnabled;
9
11
13
14 internal static string ExceptionOccurred => GetResourceString("ExceptionOccurred");
15
16 internal static string MustAddListener => GetResourceString("MustAddListener");
17
18 internal static string TraceListenerFail => GetResourceString("TraceListenerFail");
19
20 internal static string TraceListenerIndentSize => GetResourceString("TraceListenerIndentSize");
21
22 internal static string DebugAssertBanner => GetResourceString("DebugAssertBanner");
23
24 internal static string DebugAssertShortMessage => GetResourceString("DebugAssertShortMessage");
25
26 internal static string DebugAssertLongMessage => GetResourceString("DebugAssertLongMessage");
27
28 internal static string TraceSwitchLevelTooLow => GetResourceString("TraceSwitchLevelTooLow");
29
30 internal static string TraceSwitchInvalidLevel => GetResourceString("TraceSwitchInvalidLevel");
31
32 internal static string TraceSwitchLevelTooHigh => GetResourceString("TraceSwitchLevelTooHigh");
33
34 internal static string InvalidNullEmptyArgument => GetResourceString("InvalidNullEmptyArgument");
35
36 private static bool UsingResourceKeys()
37 {
39 }
40
41 internal static string GetResourceString(string resourceKey)
42 {
44 {
45 return resourceKey;
46 }
47 string result = null;
48 try
49 {
50 result = ResourceManager.GetString(resourceKey);
51 }
53 {
54 }
55 return result;
56 }
57
58 internal static string Format(string resourceFormat, object p1)
59 {
61 {
62 return string.Join(", ", resourceFormat, p1);
63 }
64 return string.Format(resourceFormat, p1);
65 }
66
67 internal static string Format(string resourceFormat, object p1, object p2)
68 {
70 {
71 return string.Join(", ", resourceFormat, p1, p2);
72 }
73 return string.Format(resourceFormat, p1, p2);
74 }
75}
static bool TryGetSwitch(string switchName, out bool isEnabled)
Definition AppContext.cs:74
virtual ? string GetString(string name)
static string InvalidNullEmptyArgument
Definition SR.cs:34
static string MustAddListener
Definition SR.cs:16
static ResourceManager s_resourceManager
Definition SR.cs:10
static string DebugAssertLongMessage
Definition SR.cs:26
static string DebugAssertBanner
Definition SR.cs:22
static string Format(string resourceFormat, object p1)
Definition SR.cs:58
static string Format(string resourceFormat, object p1, object p2)
Definition SR.cs:67
static string TraceSwitchLevelTooHigh
Definition SR.cs:32
static string TraceListenerIndentSize
Definition SR.cs:20
static string ExceptionOccurred
Definition SR.cs:14
static ResourceManager ResourceManager
Definition SR.cs:12
static string DebugAssertShortMessage
Definition SR.cs:24
static string TraceListenerFail
Definition SR.cs:18
static string TraceSwitchInvalidLevel
Definition SR.cs:30
static string GetResourceString(string resourceKey)
Definition SR.cs:101
static bool UsingResourceKeys()
Definition SR.cs:36
static readonly bool s_usingResourceKeys
Definition SR.cs:8
static string TraceSwitchLevelTooLow
Definition SR.cs:28