Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SR.cs
Go to the documentation of this file.
1
using
System.Resources
;
2
using
FxResources.System.Linq
;
3
4
namespace
System
;
5
6
internal
static
class
SR
7
{
8
private
static
readonly
bool
s_usingResourceKeys
=
AppContext
.
TryGetSwitch
(
"System.Resources.UseSystemResourceKeys"
, out var isEnabled) && isEnabled;
9
10
private
static
ResourceManager
s_resourceManager
;
11
12
internal
static
ResourceManager
ResourceManager
=>
s_resourceManager
?? (
s_resourceManager
=
new
ResourceManager
(typeof(
SR
)));
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
{
26
return
s_usingResourceKeys
;
27
}
28
29
internal
static
string
GetResourceString
(
string
resourceKey)
30
{
31
if
(
UsingResourceKeys
())
32
{
33
return
resourceKey;
34
}
35
string
result =
null
;
36
try
37
{
38
result =
ResourceManager
.
GetString
(resourceKey);
39
}
40
catch
(
MissingManifestResourceException
)
41
{
42
}
43
return
result;
44
}
45
}
FxResources.System.Linq.SR
Definition
SR.cs:4
System.AppContext.TryGetSwitch
static bool TryGetSwitch(string switchName, out bool isEnabled)
Definition
AppContext.cs:74
System.AppContext
Definition
AppContext.cs:14
System.Resources.MissingManifestResourceException
Definition
MissingManifestResourceException.cs:9
System.Resources.ResourceManager.GetString
virtual ? string GetString(string name)
Definition
ResourceManager.cs:459
System.Resources.ResourceManager
Definition
ResourceManager.cs:10
System.SR.NoElements
static string NoElements
Definition
SR.cs:16
System.SR.MoreThanOneMatch
static string MoreThanOneMatch
Definition
SR.cs:14
System.SR.s_resourceManager
static ResourceManager s_resourceManager
Definition
SR.cs:10
System.SR.ResourceManager
static ResourceManager ResourceManager
Definition
SR.cs:12
System.SR.GetResourceString
static string GetResourceString(string resourceKey)
Definition
SR.cs:101
System.SR.UsingResourceKeys
static bool UsingResourceKeys()
Definition
SR.cs:24
System.SR.s_usingResourceKeys
static readonly bool s_usingResourceKeys
Definition
SR.cs:8
System.SR.NoMatch
static string NoMatch
Definition
SR.cs:22
System.SR.EmptyEnumerable
static string EmptyEnumerable
Definition
SR.cs:14
System.SR.MoreThanOneElement
static string MoreThanOneElement
Definition
SR.cs:16
FxResources.System.Linq
Definition
SR.cs:1
System.Resources
Definition
FastResourceComparer.cs:5
System
Definition
BlockingCollection.cs:8
source
System.Linq
System
SR.cs
Generated by
1.10.0