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 EmptyEnumerable => GetResourceString("EmptyEnumerable");
15
16 internal static string MoreThanOneElement => GetResourceString("MoreThanOneElement");
17
18 internal static string MoreThanOneMatch => GetResourceString("MoreThanOneMatch");
19
20 internal static string NoElements => GetResourceString("NoElements");
21
22 internal static string NoMatch => GetResourceString("NoMatch");
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}
static bool TryGetSwitch(string switchName, out bool isEnabled)
Definition AppContext.cs:74
virtual ? string GetString(string name)
static string NoElements
Definition SR.cs:16
static string MoreThanOneMatch
Definition SR.cs:14
static ResourceManager s_resourceManager
Definition SR.cs:10
static ResourceManager ResourceManager
Definition SR.cs:12
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 NoMatch
Definition SR.cs:22
static string EmptyEnumerable
Definition SR.cs:14
static string MoreThanOneElement
Definition SR.cs:16