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.Resources.Writer
;
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
InvalidOperation_ResourceWriterSaved
=>
GetResourceString
(
"InvalidOperation_ResourceWriterSaved"
);
15
16
internal
static
string
Argument_StreamNotWritable
=>
GetResourceString
(
"Argument_StreamNotWritable"
);
17
18
internal
static
string
NotSupported_UnseekableStream
=>
GetResourceString
(
"NotSupported_UnseekableStream"
);
19
20
internal
static
string
NotSupported_BinarySerializedResources
=>
GetResourceString
(
"NotSupported_BinarySerializedResources"
);
21
22
internal
static
string
ArgumentOutOfRange_StreamLength
=>
GetResourceString
(
"ArgumentOutOfRange_StreamLength"
);
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.Resources.Writer.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.s_resourceManager
static ResourceManager s_resourceManager
Definition
SR.cs:10
System.SR.NotSupported_BinarySerializedResources
static string NotSupported_BinarySerializedResources
Definition
SR.cs:20
System.SR.Argument_StreamNotWritable
static string Argument_StreamNotWritable
Definition
SR.cs:878
System.SR.NotSupported_UnseekableStream
static string NotSupported_UnseekableStream
Definition
SR.cs:26
System.SR.ResourceManager
static ResourceManager ResourceManager
Definition
SR.cs:12
System.SR.InvalidOperation_ResourceWriterSaved
static string InvalidOperation_ResourceWriterSaved
Definition
SR.cs:14
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.ArgumentOutOfRange_StreamLength
static string ArgumentOutOfRange_StreamLength
Definition
SR.cs:1110
FxResources.System.Resources.Writer
Definition
SR.cs:1
System.Resources
Definition
FastResourceComparer.cs:5
System
Definition
BlockingCollection.cs:8
source
System.Resources.Writer
System
SR.cs
Generated by
1.10.0