Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SR.cs
Go to the documentation of this file.
3
4namespace System;
5
6internal static class SR
7{
8 private static readonly bool s_usingResourceKeys = AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out var isEnabled) && isEnabled;
9
11
13
14 internal static string AsyncFlowAndESInteropNotSupported => GetResourceString("AsyncFlowAndESInteropNotSupported");
15
16 internal static string BadAsyncResult => GetResourceString("BadAsyncResult");
17
18 internal static string BadResourceManagerId => GetResourceString("BadResourceManagerId");
19
20 internal static string CannotPromoteSnapshot => GetResourceString("CannotPromoteSnapshot");
21
22 internal static string CannotSetCurrent => GetResourceString("CannotSetCurrent");
23
24 internal static string CurrentDelegateSet => GetResourceString("CurrentDelegateSet");
25
26 internal static string DisposeScope => GetResourceString("DisposeScope");
27
28 internal static string EnlistmentStateException => GetResourceString("EnlistmentStateException");
29
30 internal static string EsNotSupported => GetResourceString("EsNotSupported");
31
32 internal static string InternalError => GetResourceString("InternalError");
33
34 internal static string InvalidArgument => GetResourceString("InvalidArgument");
35
36 internal static string InvalidIPromotableSinglePhaseNotificationSpecified => GetResourceString("InvalidIPromotableSinglePhaseNotificationSpecified");
37
38 internal static string InvalidRecoveryInformation => GetResourceString("InvalidRecoveryInformation");
39
40 internal static string InvalidScopeThread => GetResourceString("InvalidScopeThread");
41
42 internal static string PromotionFailed => GetResourceString("PromotionFailed");
43
44 internal static string PromotedReturnedInvalidValue => GetResourceString("PromotedReturnedInvalidValue");
45
46 internal static string PromotedTransactionExists => GetResourceString("PromotedTransactionExists");
47
48 internal static string TooLate => GetResourceString("TooLate");
49
50 internal static string TraceTransactionTimeout => GetResourceString("TraceTransactionTimeout");
51
52 internal static string TransactionAborted => GetResourceString("TransactionAborted");
53
54 internal static string TransactionAlreadyCompleted => GetResourceString("TransactionAlreadyCompleted");
55
56 internal static string TransactionIndoubt => GetResourceString("TransactionIndoubt");
57
58 internal static string TransactionManagerCommunicationException => GetResourceString("TransactionManagerCommunicationException");
59
60 internal static string TransactionScopeComplete => GetResourceString("TransactionScopeComplete");
61
62 internal static string TransactionScopeIncorrectCurrent => GetResourceString("TransactionScopeIncorrectCurrent");
63
64 internal static string TransactionScopeInvalidNesting => GetResourceString("TransactionScopeInvalidNesting");
65
66 internal static string TransactionScopeIsolationLevelDifferentFromTransaction => GetResourceString("TransactionScopeIsolationLevelDifferentFromTransaction");
67
68 internal static string TransactionScopeTimerObjectInvalid => GetResourceString("TransactionScopeTimerObjectInvalid");
69
70 internal static string TransactionStateException => GetResourceString("TransactionStateException");
71
72 internal static string UnexpectedFailureOfThreadPool => GetResourceString("UnexpectedFailureOfThreadPool");
73
74 internal static string UnexpectedTimerFailure => GetResourceString("UnexpectedTimerFailure");
75
76 internal static string UnrecognizedRecoveryInformation => GetResourceString("UnrecognizedRecoveryInformation");
77
78 internal static string VolEnlistNoRecoveryInfo => GetResourceString("VolEnlistNoRecoveryInfo");
79
80 internal static string DistributedTxIDInTransactionException => GetResourceString("DistributedTxIDInTransactionException");
81
82 internal static string PromoterTypeInvalid => GetResourceString("PromoterTypeInvalid");
83
84 internal static string PromoterTypeUnrecognized => GetResourceString("PromoterTypeUnrecognized");
85
86 internal static string DistributedNotSupported => GetResourceString("DistributedNotSupported");
87
88 private static bool UsingResourceKeys()
89 {
91 }
92
93 internal static string GetResourceString(string resourceKey)
94 {
96 {
97 return resourceKey;
98 }
99 string result = null;
100 try
101 {
102 result = ResourceManager.GetString(resourceKey);
103 }
105 {
106 }
107 return result;
108 }
109
110 internal static string Format(string resourceFormat, object p1)
111 {
112 if (UsingResourceKeys())
113 {
114 return string.Join(", ", resourceFormat, p1);
115 }
116 return string.Format(resourceFormat, p1);
117 }
118
119 internal static string Format(string resourceFormat, object p1, object p2)
120 {
121 if (UsingResourceKeys())
122 {
123 return string.Join(", ", resourceFormat, p1, p2);
124 }
125 return string.Format(resourceFormat, p1, p2);
126 }
127}
static bool TryGetSwitch(string switchName, out bool isEnabled)
Definition AppContext.cs:74
virtual ? string GetString(string name)
static string BadResourceManagerId
Definition SR.cs:18
static string InvalidIPromotableSinglePhaseNotificationSpecified
Definition SR.cs:36
static string PromotedReturnedInvalidValue
Definition SR.cs:44
static string UnrecognizedRecoveryInformation
Definition SR.cs:76
static string InternalError
Definition SR.cs:32
static string PromoterTypeUnrecognized
Definition SR.cs:84
static string UnexpectedFailureOfThreadPool
Definition SR.cs:72
static ResourceManager s_resourceManager
Definition SR.cs:10
static string CannotPromoteSnapshot
Definition SR.cs:20
static string VolEnlistNoRecoveryInfo
Definition SR.cs:78
static string DistributedNotSupported
Definition SR.cs:86
static string AsyncFlowAndESInteropNotSupported
Definition SR.cs:14
static string TransactionScopeComplete
Definition SR.cs:60
static string DistributedTxIDInTransactionException
Definition SR.cs:80
static string Format(string resourceFormat, object p1)
Definition SR.cs:110
static string PromoterTypeInvalid
Definition SR.cs:82
static string TransactionScopeIsolationLevelDifferentFromTransaction
Definition SR.cs:66
static string InvalidRecoveryInformation
Definition SR.cs:38
static string Format(string resourceFormat, object p1, object p2)
Definition SR.cs:119
static string TransactionManagerCommunicationException
Definition SR.cs:58
static string CurrentDelegateSet
Definition SR.cs:24
static string InvalidScopeThread
Definition SR.cs:40
static string TransactionStateException
Definition SR.cs:70
static string TraceTransactionTimeout
Definition SR.cs:50
static string DisposeScope
Definition SR.cs:26
static ResourceManager ResourceManager
Definition SR.cs:12
static string EsNotSupported
Definition SR.cs:30
static string TransactionScopeIncorrectCurrent
Definition SR.cs:62
static string TransactionIndoubt
Definition SR.cs:56
static string TransactionAborted
Definition SR.cs:52
static string UnexpectedTimerFailure
Definition SR.cs:74
static string TransactionAlreadyCompleted
Definition SR.cs:54
static string InvalidArgument
Definition SR.cs:34
static string PromotionFailed
Definition SR.cs:42
static string GetResourceString(string resourceKey)
Definition SR.cs:101
static string BadAsyncResult
Definition SR.cs:16
static bool UsingResourceKeys()
Definition SR.cs:88
static string CannotSetCurrent
Definition SR.cs:22
static readonly bool s_usingResourceKeys
Definition SR.cs:8
static string PromotedTransactionExists
Definition SR.cs:46
static string TransactionScopeInvalidNesting
Definition SR.cs:64
static string EnlistmentStateException
Definition SR.cs:28
static string TooLate
Definition SR.cs:48
static string TransactionScopeTimerObjectInvalid
Definition SR.cs:68