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.ComponentModel.EventBasedAsync
;
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
Async_NullDelegate
=>
GetResourceString
(
"Async_NullDelegate"
);
15
16
internal
static
string
Async_OperationAlreadyCompleted
=>
GetResourceString
(
"Async_OperationAlreadyCompleted"
);
17
18
internal
static
string
Async_OperationCancelled
=>
GetResourceString
(
"Async_OperationCancelled"
);
19
20
internal
static
string
Async_ExceptionOccurred
=>
GetResourceString
(
"Async_ExceptionOccurred"
);
21
22
internal
static
string
BackgroundWorker_WorkerAlreadyRunning
=>
GetResourceString
(
"BackgroundWorker_WorkerAlreadyRunning"
);
23
24
internal
static
string
BackgroundWorker_WorkerDoesntReportProgress
=>
GetResourceString
(
"BackgroundWorker_WorkerDoesntReportProgress"
);
25
26
internal
static
string
BackgroundWorker_WorkerDoesntSupportCancellation
=>
GetResourceString
(
"BackgroundWorker_WorkerDoesntSupportCancellation"
);
27
28
private
static
bool
UsingResourceKeys
()
29
{
30
return
s_usingResourceKeys
;
31
}
32
33
internal
static
string
GetResourceString
(
string
resourceKey)
34
{
35
if
(
UsingResourceKeys
())
36
{
37
return
resourceKey;
38
}
39
string
result =
null
;
40
try
41
{
42
result =
ResourceManager
.
GetString
(resourceKey);
43
}
44
catch
(
MissingManifestResourceException
)
45
{
46
}
47
return
result;
48
}
49
}
FxResources.System.ComponentModel.EventBasedAsync.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.Async_OperationAlreadyCompleted
static string Async_OperationAlreadyCompleted
Definition
SR.cs:16
System.SR.s_resourceManager
static ResourceManager s_resourceManager
Definition
SR.cs:10
System.SR.BackgroundWorker_WorkerDoesntReportProgress
static string BackgroundWorker_WorkerDoesntReportProgress
Definition
SR.cs:24
System.SR.BackgroundWorker_WorkerAlreadyRunning
static string BackgroundWorker_WorkerAlreadyRunning
Definition
SR.cs:22
System.SR.ResourceManager
static ResourceManager ResourceManager
Definition
SR.cs:12
System.SR.Async_ExceptionOccurred
static string Async_ExceptionOccurred
Definition
SR.cs:20
System.SR.BackgroundWorker_WorkerDoesntSupportCancellation
static string BackgroundWorker_WorkerDoesntSupportCancellation
Definition
SR.cs:26
System.SR.GetResourceString
static string GetResourceString(string resourceKey)
Definition
SR.cs:101
System.SR.UsingResourceKeys
static bool UsingResourceKeys()
Definition
SR.cs:28
System.SR.s_usingResourceKeys
static readonly bool s_usingResourceKeys
Definition
SR.cs:8
System.SR.Async_OperationCancelled
static string Async_OperationCancelled
Definition
SR.cs:18
System.SR.Async_NullDelegate
static string Async_NullDelegate
Definition
SR.cs:14
FxResources.System.ComponentModel.EventBasedAsync
Definition
SR.cs:1
System.Resources
Definition
FastResourceComparer.cs:5
System
Definition
BlockingCollection.cs:8
source
System.ComponentModel.EventBasedAsync
System
SR.cs
Generated by
1.10.0