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 ArgumentNotIEnumerableGeneric => GetResourceString("ArgumentNotIEnumerableGeneric");
15
16 internal static string ArgumentNotValid => GetResourceString("ArgumentNotValid");
17
18 internal static string NoMethodOnType => GetResourceString("NoMethodOnType");
19
20 internal static string NoMethodOnTypeMatchingArguments => GetResourceString("NoMethodOnTypeMatchingArguments");
21
22 internal static string EnumeratingNullEnumerableExpression => GetResourceString("EnumeratingNullEnumerableExpression");
23
24 private static bool UsingResourceKeys()
25 {
27 }
28
29 internal static string GetResourceString(string resourceKey)
30 {
32 {
33 return resourceKey;
34 }
35 string result = null;
36 try
37 {
38 result = ResourceManager.GetString(resourceKey);
39 }
41 {
42 }
43 return result;
44 }
45
46 internal static string Format(string resourceFormat, object p1)
47 {
49 {
50 return string.Join(", ", resourceFormat, p1);
51 }
52 return string.Format(resourceFormat, p1);
53 }
54
55 internal static string Format(string resourceFormat, object p1, object p2)
56 {
58 {
59 return string.Join(", ", resourceFormat, p1, p2);
60 }
61 return string.Format(resourceFormat, p1, p2);
62 }
63}
static bool TryGetSwitch(string switchName, out bool isEnabled)
Definition AppContext.cs:74
virtual ? string GetString(string name)
static string ArgumentNotIEnumerableGeneric
Definition SR.cs:14
static string EnumeratingNullEnumerableExpression
Definition SR.cs:22
static ResourceManager s_resourceManager
Definition SR.cs:10
static string ArgumentNotValid
Definition SR.cs:16
static string Format(string resourceFormat, object p1)
Definition SR.cs:46
static string Format(string resourceFormat, object p1, object p2)
Definition SR.cs:55
static ResourceManager ResourceManager
Definition SR.cs:12
static string NoMethodOnType
Definition SR.cs:18
static string GetResourceString(string resourceKey)
Definition SR.cs:101
static bool UsingResourceKeys()
Definition SR.cs:24
static readonly bool s_usingResourceKeys
Definition SR.cs:8
static string NoMethodOnTypeMatchingArguments
Definition SR.cs:20