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.Runtime.Numerics
;
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
Argument_BadFormatSpecifier
=>
GetResourceString
(
"Argument_BadFormatSpecifier"
);
15
16
internal
static
string
Argument_InvalidNumberStyles
=>
GetResourceString
(
"Argument_InvalidNumberStyles"
);
17
18
internal
static
string
Argument_InvalidHexStyle
=>
GetResourceString
(
"Argument_InvalidHexStyle"
);
19
20
internal
static
string
Argument_MustBeBigInt
=>
GetResourceString
(
"Argument_MustBeBigInt"
);
21
22
internal
static
string
Format_TooLarge
=>
GetResourceString
(
"Format_TooLarge"
);
23
24
internal
static
string
ArgumentOutOfRange_MustBeNonNeg
=>
GetResourceString
(
"ArgumentOutOfRange_MustBeNonNeg"
);
25
26
internal
static
string
Overflow_BigIntInfinity
=>
GetResourceString
(
"Overflow_BigIntInfinity"
);
27
28
internal
static
string
Overflow_NotANumber
=>
GetResourceString
(
"Overflow_NotANumber"
);
29
30
internal
static
string
Overflow_ParseBigInteger
=>
GetResourceString
(
"Overflow_ParseBigInteger"
);
31
32
internal
static
string
Overflow_Int32
=>
GetResourceString
(
"Overflow_Int32"
);
33
34
internal
static
string
Overflow_Int64
=>
GetResourceString
(
"Overflow_Int64"
);
35
36
internal
static
string
Overflow_UInt32
=>
GetResourceString
(
"Overflow_UInt32"
);
37
38
internal
static
string
Overflow_UInt64
=>
GetResourceString
(
"Overflow_UInt64"
);
39
40
internal
static
string
Overflow_Decimal
=>
GetResourceString
(
"Overflow_Decimal"
);
41
42
internal
static
string
Overflow_Negative_Unsigned
=>
GetResourceString
(
"Overflow_Negative_Unsigned"
);
43
44
private
static
bool
UsingResourceKeys
()
45
{
46
return
s_usingResourceKeys
;
47
}
48
49
internal
static
string
GetResourceString
(
string
resourceKey)
50
{
51
if
(
UsingResourceKeys
())
52
{
53
return
resourceKey;
54
}
55
string
result =
null
;
56
try
57
{
58
result =
ResourceManager
.
GetString
(resourceKey);
59
}
60
catch
(
MissingManifestResourceException
)
61
{
62
}
63
return
result;
64
}
65
66
internal
static
string
Format
(
string
resourceFormat,
object
p1)
67
{
68
if
(
UsingResourceKeys
())
69
{
70
return
string
.Join(
", "
, resourceFormat, p1);
71
}
72
return
string
.Format(resourceFormat, p1);
73
}
74
}
FxResources.System.Runtime.Numerics.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.Overflow_NotANumber
static string Overflow_NotANumber
Definition
SR.cs:28
System.SR.Argument_InvalidNumberStyles
static string Argument_InvalidNumberStyles
Definition
SR.cs:720
System.SR.s_resourceManager
static ResourceManager s_resourceManager
Definition
SR.cs:10
System.SR.Overflow_Int32
static string Overflow_Int32
Definition
SR.cs:1772
System.SR.Overflow_UInt64
static string Overflow_UInt64
Definition
SR.cs:1790
System.SR.Overflow_BigIntInfinity
static string Overflow_BigIntInfinity
Definition
SR.cs:26
System.SR.Overflow_ParseBigInteger
static string Overflow_ParseBigInteger
Definition
SR.cs:30
System.SR.Format
static string Format(string resourceFormat, object p1)
Definition
SR.cs:66
System.SR.ArgumentOutOfRange_MustBeNonNeg
static string ArgumentOutOfRange_MustBeNonNeg
Definition
SR.cs:24
System.SR.Argument_BadFormatSpecifier
static string Argument_BadFormatSpecifier
Definition
SR.cs:488
System.SR.Overflow_Int64
static string Overflow_Int64
Definition
SR.cs:1774
System.SR.ResourceManager
static ResourceManager ResourceManager
Definition
SR.cs:12
System.SR.Format_TooLarge
static string Format_TooLarge
Definition
SR.cs:22
System.SR.Argument_InvalidHexStyle
static string Argument_InvalidHexStyle
Definition
SR.cs:18
System.SR.Overflow_Negative_Unsigned
static string Overflow_Negative_Unsigned
Definition
SR.cs:42
System.SR.Argument_MustBeBigInt
static string Argument_MustBeBigInt
Definition
SR.cs:20
System.SR.GetResourceString
static string GetResourceString(string resourceKey)
Definition
SR.cs:101
System.SR.UsingResourceKeys
static bool UsingResourceKeys()
Definition
SR.cs:44
System.SR.s_usingResourceKeys
static readonly bool s_usingResourceKeys
Definition
SR.cs:8
System.SR.Overflow_Decimal
static string Overflow_Decimal
Definition
SR.cs:1766
System.SR.Overflow_UInt32
static string Overflow_UInt32
Definition
SR.cs:1788
FxResources.System.Runtime.Numerics
Definition
SR.cs:1
System.Resources
Definition
FastResourceComparer.cs:5
System
Definition
BlockingCollection.cs:8
source
System.Runtime.Numerics
System
SR.cs
Generated by
1.10.0