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.Net.WebHeaderCollection
;
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
net_headers_req
=>
GetResourceString
(
"net_headers_req"
);
15
16
internal
static
string
net_headers_rsp
=>
GetResourceString
(
"net_headers_rsp"
);
17
18
internal
static
string
net_emptyStringCall
=>
GetResourceString
(
"net_emptyStringCall"
);
19
20
internal
static
string
net_WebHeaderInvalidControlChars
=>
GetResourceString
(
"net_WebHeaderInvalidControlChars"
);
21
22
internal
static
string
net_WebHeaderInvalidCRLFChars
=>
GetResourceString
(
"net_WebHeaderInvalidCRLFChars"
);
23
24
internal
static
string
net_WebHeaderInvalidHeaderChars
=>
GetResourceString
(
"net_WebHeaderInvalidHeaderChars"
);
25
26
internal
static
string
net_WebHeaderMissingColon
=>
GetResourceString
(
"net_WebHeaderMissingColon"
);
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
50
internal
static
string
Format
(
string
resourceFormat,
object
p1)
51
{
52
if
(
UsingResourceKeys
())
53
{
54
return
string
.Join(
", "
, resourceFormat, p1);
55
}
56
return
string
.Format(resourceFormat, p1);
57
}
58
}
FxResources.System.Net.WebHeaderCollection.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.net_emptyStringCall
static string net_emptyStringCall
Definition
SR.cs:18
System.SR.net_WebHeaderMissingColon
static string net_WebHeaderMissingColon
Definition
SR.cs:26
System.SR.s_resourceManager
static ResourceManager s_resourceManager
Definition
SR.cs:10
System.SR.Format
static string Format(string resourceFormat, object p1)
Definition
SR.cs:50
System.SR.ResourceManager
static ResourceManager ResourceManager
Definition
SR.cs:12
System.SR.net_headers_rsp
static string net_headers_rsp
Definition
SR.cs:16
System.SR.net_WebHeaderInvalidCRLFChars
static string net_WebHeaderInvalidCRLFChars
Definition
SR.cs:72
System.SR.net_WebHeaderInvalidControlChars
static string net_WebHeaderInvalidControlChars
Definition
SR.cs:102
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.net_WebHeaderInvalidHeaderChars
static string net_WebHeaderInvalidHeaderChars
Definition
SR.cs:24
System.SR.net_headers_req
static string net_headers_req
Definition
SR.cs:14
FxResources.System.Net.WebHeaderCollection
Definition
SR.cs:1
System.Resources
Definition
FastResourceComparer.cs:5
System
Definition
BlockingCollection.cs:8
source
System.Net.WebHeaderCollection
System
SR.cs
Generated by
1.10.0