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 ImageTooSmall => GetResourceString("ImageTooSmall");
15
16 internal static string InvalidCorHeaderSize => GetResourceString("InvalidCorHeaderSize");
17
18 internal static string InvalidHandle => GetResourceString("InvalidHandle");
19
20 internal static string UnexpectedHandleKind => GetResourceString("UnexpectedHandleKind");
21
22 internal static string UnexpectedOpCode => GetResourceString("UnexpectedOpCode");
23
24 internal static string InvalidLocalSignatureToken => GetResourceString("InvalidLocalSignatureToken");
25
26 internal static string InvalidMetadataSectionSpan => GetResourceString("InvalidMetadataSectionSpan");
27
28 internal static string InvalidMethodHeader1 => GetResourceString("InvalidMethodHeader1");
29
30 internal static string InvalidMethodHeader2 => GetResourceString("InvalidMethodHeader2");
31
32 internal static string InvalidPESignature => GetResourceString("InvalidPESignature");
33
34 internal static string InvalidSehHeader => GetResourceString("InvalidSehHeader");
35
36 internal static string InvalidToken => GetResourceString("InvalidToken");
37
38 internal static string MetadataImageDoesNotRepresentAnAssembly => GetResourceString("MetadataImageDoesNotRepresentAnAssembly");
39
40 internal static string StandaloneDebugMetadataImageDoesNotContainModuleTable => GetResourceString("StandaloneDebugMetadataImageDoesNotContainModuleTable");
41
42 internal static string PEImageNotAvailable => GetResourceString("PEImageNotAvailable");
43
44 internal static string MissingDataDirectory => GetResourceString("MissingDataDirectory");
45
46 internal static string NotMetadataHeapHandle => GetResourceString("NotMetadataHeapHandle");
47
48 internal static string NotMetadataTableOrUserStringHandle => GetResourceString("NotMetadataTableOrUserStringHandle");
49
50 internal static string SectionTooSmall => GetResourceString("SectionTooSmall");
51
52 internal static string StreamMustSupportReadAndSeek => GetResourceString("StreamMustSupportReadAndSeek");
53
54 internal static string UnknownFileFormat => GetResourceString("UnknownFileFormat");
55
56 internal static string UnknownPEMagicValue => GetResourceString("UnknownPEMagicValue");
57
58 internal static string MetadataTableNotSorted => GetResourceString("MetadataTableNotSorted");
59
60 internal static string ModuleTableInvalidNumberOfRows => GetResourceString("ModuleTableInvalidNumberOfRows");
61
62 internal static string UnknownTables => GetResourceString("UnknownTables");
63
64 internal static string IllegalTablesInCompressedMetadataStream => GetResourceString("IllegalTablesInCompressedMetadataStream");
65
66 internal static string TableRowCountSpaceTooSmall => GetResourceString("TableRowCountSpaceTooSmall");
67
68 internal static string OutOfBoundsRead => GetResourceString("OutOfBoundsRead");
69
70 internal static string OutOfBoundsWrite => GetResourceString("OutOfBoundsWrite");
71
72 internal static string MetadataHeaderTooSmall => GetResourceString("MetadataHeaderTooSmall");
73
74 internal static string MetadataSignature => GetResourceString("MetadataSignature");
75
76 internal static string NotEnoughSpaceForVersionString => GetResourceString("NotEnoughSpaceForVersionString");
77
78 internal static string StreamHeaderTooSmall => GetResourceString("StreamHeaderTooSmall");
79
80 internal static string NotEnoughSpaceForStreamHeaderName => GetResourceString("NotEnoughSpaceForStreamHeaderName");
81
82 internal static string NotEnoughSpaceForStringStream => GetResourceString("NotEnoughSpaceForStringStream");
83
84 internal static string NotEnoughSpaceForBlobStream => GetResourceString("NotEnoughSpaceForBlobStream");
85
86 internal static string NotEnoughSpaceForGUIDStream => GetResourceString("NotEnoughSpaceForGUIDStream");
87
88 internal static string NotEnoughSpaceForMetadataStream => GetResourceString("NotEnoughSpaceForMetadataStream");
89
90 internal static string InvalidMetadataStreamFormat => GetResourceString("InvalidMetadataStreamFormat");
91
92 internal static string MetadataTablesTooSmall => GetResourceString("MetadataTablesTooSmall");
93
94 internal static string MetadataTableHeaderTooSmall => GetResourceString("MetadataTableHeaderTooSmall");
95
96 internal static string WinMDMissingMscorlibRef => GetResourceString("WinMDMissingMscorlibRef");
97
98 internal static string UnexpectedStreamEnd => GetResourceString("UnexpectedStreamEnd");
99
100 internal static string InvalidMethodRva => GetResourceString("InvalidMethodRva");
101
102 internal static string CantGetOffsetForVirtualHeapHandle => GetResourceString("CantGetOffsetForVirtualHeapHandle");
103
104 internal static string InvalidNumberOfSections => GetResourceString("InvalidNumberOfSections");
105
106 internal static string InvalidSignature => GetResourceString("InvalidSignature");
107
108 internal static string PEImageDoesNotHaveMetadata => GetResourceString("PEImageDoesNotHaveMetadata");
109
110 internal static string InvalidCodedIndex => GetResourceString("InvalidCodedIndex");
111
112 internal static string InvalidCompressedInteger => GetResourceString("InvalidCompressedInteger");
113
114 internal static string InvalidDocumentName => GetResourceString("InvalidDocumentName");
115
116 internal static string RowIdOrHeapOffsetTooLarge => GetResourceString("RowIdOrHeapOffsetTooLarge");
117
118 internal static string EnCMapNotSorted => GetResourceString("EnCMapNotSorted");
119
120 internal static string InvalidSerializedString => GetResourceString("InvalidSerializedString");
121
122 internal static string StreamTooLarge => GetResourceString("StreamTooLarge");
123
124 internal static string ImageTooSmallOrContainsInvalidOffsetOrCount => GetResourceString("ImageTooSmallOrContainsInvalidOffsetOrCount");
125
126 internal static string MetadataStringDecoderEncodingMustBeUtf8 => GetResourceString("MetadataStringDecoderEncodingMustBeUtf8");
127
128 internal static string InvalidConstantValue => GetResourceString("InvalidConstantValue");
129
130 internal static string InvalidConstantValueOfType => GetResourceString("InvalidConstantValueOfType");
131
132 internal static string InvalidImportDefinitionKind => GetResourceString("InvalidImportDefinitionKind");
133
134 internal static string ValueTooLarge => GetResourceString("ValueTooLarge");
135
136 internal static string BlobTooLarge => GetResourceString("BlobTooLarge");
137
138 internal static string InvalidTypeSize => GetResourceString("InvalidTypeSize");
139
140 internal static string HandleBelongsToFutureGeneration => GetResourceString("HandleBelongsToFutureGeneration");
141
142 internal static string InvalidRowCount => GetResourceString("InvalidRowCount");
143
144 internal static string InvalidEntryPointToken => GetResourceString("InvalidEntryPointToken");
145
146 internal static string TooManySubnamespaces => GetResourceString("TooManySubnamespaces");
147
148 internal static string TooManyExceptionRegions => GetResourceString("TooManyExceptionRegions");
149
150 internal static string SequencePointValueOutOfRange => GetResourceString("SequencePointValueOutOfRange");
151
152 internal static string InvalidDirectoryRVA => GetResourceString("InvalidDirectoryRVA");
153
154 internal static string InvalidDirectorySize => GetResourceString("InvalidDirectorySize");
155
156 internal static string InvalidDebugDirectoryEntryCharacteristics => GetResourceString("InvalidDebugDirectoryEntryCharacteristics");
157
158 internal static string UnexpectedCodeViewDataSignature => GetResourceString("UnexpectedCodeViewDataSignature");
159
160 internal static string UnexpectedEmbeddedPortablePdbDataSignature => GetResourceString("UnexpectedEmbeddedPortablePdbDataSignature");
161
162 internal static string InvalidPdbChecksumDataFormat => GetResourceString("InvalidPdbChecksumDataFormat");
163
164 internal static string UnexpectedSignatureHeader => GetResourceString("UnexpectedSignatureHeader");
165
166 internal static string UnexpectedSignatureHeader2 => GetResourceString("UnexpectedSignatureHeader2");
167
168 internal static string NotTypeDefOrRefHandle => GetResourceString("NotTypeDefOrRefHandle");
169
170 internal static string UnexpectedSignatureTypeCode => GetResourceString("UnexpectedSignatureTypeCode");
171
172 internal static string SignatureTypeSequenceMustHaveAtLeastOneElement => GetResourceString("SignatureTypeSequenceMustHaveAtLeastOneElement");
173
174 internal static string NotTypeDefOrRefOrSpecHandle => GetResourceString("NotTypeDefOrRefOrSpecHandle");
175
176 internal static string UnexpectedDebugDirectoryType => GetResourceString("UnexpectedDebugDirectoryType");
177
178 internal static string HeapSizeLimitExceeded => GetResourceString("HeapSizeLimitExceeded");
179
180 internal static string BuilderMustAligned => GetResourceString("BuilderMustAligned");
181
182 internal static string BuilderAlreadyLinked => GetResourceString("BuilderAlreadyLinked");
183
184 internal static string ReturnedBuilderSizeTooSmall => GetResourceString("ReturnedBuilderSizeTooSmall");
185
186 internal static string SignatureNotVarArg => GetResourceString("SignatureNotVarArg");
187
188 internal static string LabelDoesntBelongToBuilder => GetResourceString("LabelDoesntBelongToBuilder");
189
190 internal static string ControlFlowBuilderNotAvailable => GetResourceString("ControlFlowBuilderNotAvailable");
191
192 internal static string BaseReaderMustBeFullMetadataReader => GetResourceString("BaseReaderMustBeFullMetadataReader");
193
194 internal static string ModuleAlreadyAdded => GetResourceString("ModuleAlreadyAdded");
195
196 internal static string AssemblyAlreadyAdded => GetResourceString("AssemblyAlreadyAdded");
197
198 internal static string ExpectedListOfSize => GetResourceString("ExpectedListOfSize");
199
200 internal static string ExpectedArrayOfSize => GetResourceString("ExpectedArrayOfSize");
201
202 internal static string ExpectedNonEmptyList => GetResourceString("ExpectedNonEmptyList");
203
204 internal static string ExpectedNonEmptyArray => GetResourceString("ExpectedNonEmptyArray");
205
206 internal static string ExpectedNonEmptyString => GetResourceString("ExpectedNonEmptyString");
207
208 internal static string ReadersMustBeDeltaReaders => GetResourceString("ReadersMustBeDeltaReaders");
209
210 internal static string SignatureProviderReturnedInvalidSignature => GetResourceString("SignatureProviderReturnedInvalidSignature");
211
212 internal static string UnknownSectionName => GetResourceString("UnknownSectionName");
213
214 internal static string HashTooShort => GetResourceString("HashTooShort");
215
216 internal static string UnexpectedArrayLength => GetResourceString("UnexpectedArrayLength");
217
218 internal static string ValueMustBeMultiple => GetResourceString("ValueMustBeMultiple");
219
220 internal static string MustNotReturnNull => GetResourceString("MustNotReturnNull");
221
222 internal static string MetadataVersionTooLong => GetResourceString("MetadataVersionTooLong");
223
224 internal static string RowCountMustBeZero => GetResourceString("RowCountMustBeZero");
225
226 internal static string RowCountOutOfRange => GetResourceString("RowCountOutOfRange");
227
228 internal static string SizeMismatch => GetResourceString("SizeMismatch");
229
230 internal static string DataTooBig => GetResourceString("DataTooBig");
231
232 internal static string UnsupportedFormatVersion => GetResourceString("UnsupportedFormatVersion");
233
234 internal static string DistanceBetweenInstructionAndLabelTooBig => GetResourceString("DistanceBetweenInstructionAndLabelTooBig");
235
236 internal static string LabelNotMarked => GetResourceString("LabelNotMarked");
237
238 internal static string MethodHasNoExceptionRegions => GetResourceString("MethodHasNoExceptionRegions");
239
240 internal static string InvalidExceptionRegionBounds => GetResourceString("InvalidExceptionRegionBounds");
241
242 internal static string UnexpectedValue => GetResourceString("UnexpectedValue");
243
244 internal static string UnexpectedValueUnknownType => GetResourceString("UnexpectedValueUnknownType");
245
246 internal static string UnreachableLocation => GetResourceString("UnreachableLocation");
247
248 private static bool UsingResourceKeys()
249 {
250 return s_usingResourceKeys;
251 }
252
253 internal static string GetResourceString(string resourceKey)
254 {
255 if (UsingResourceKeys())
256 {
257 return resourceKey;
258 }
259 string result = null;
260 try
261 {
262 result = ResourceManager.GetString(resourceKey);
263 }
265 {
266 }
267 return result;
268 }
269
270 internal static string GetResourceString(string resourceKey, string defaultString)
271 {
272 string resourceString = GetResourceString(resourceKey);
273 if (!(resourceKey == resourceString) && resourceString != null)
274 {
275 return resourceString;
276 }
277 return defaultString;
278 }
279
280 internal static string Format(string resourceFormat, object? p1)
281 {
282 if (UsingResourceKeys())
283 {
284 return string.Join(", ", resourceFormat, p1);
285 }
286 return string.Format(resourceFormat, p1);
287 }
288
289 internal static string Format(string resourceFormat, object? p1, object? p2)
290 {
291 if (UsingResourceKeys())
292 {
293 return string.Join(", ", resourceFormat, p1, p2);
294 }
295 return string.Format(resourceFormat, p1, p2);
296 }
297
298 internal static string Format(string resourceFormat, object? p1, object? p2, object? p3)
299 {
300 if (UsingResourceKeys())
301 {
302 return string.Join(", ", resourceFormat, p1, p2, p3);
303 }
304 return string.Format(resourceFormat, p1, p2, p3);
305 }
306
307 internal static string Format(string resourceFormat, params object?[]? args)
308 {
309 if (args != null)
310 {
311 if (UsingResourceKeys())
312 {
313 return resourceFormat + ", " + string.Join(", ", args);
314 }
315 return string.Format(resourceFormat, args);
316 }
317 return resourceFormat;
318 }
319
320 internal static string Format(IFormatProvider? provider, string resourceFormat, object? p1)
321 {
322 if (UsingResourceKeys())
323 {
324 return string.Join(", ", resourceFormat, p1);
325 }
326 return string.Format(provider, resourceFormat, p1);
327 }
328
329 internal static string Format(IFormatProvider? provider, string resourceFormat, object? p1, object? p2)
330 {
331 if (UsingResourceKeys())
332 {
333 return string.Join(", ", resourceFormat, p1, p2);
334 }
335 return string.Format(provider, resourceFormat, p1, p2);
336 }
337
338 internal static string Format(IFormatProvider? provider, string resourceFormat, object? p1, object? p2, object? p3)
339 {
340 if (UsingResourceKeys())
341 {
342 return string.Join(", ", resourceFormat, p1, p2, p3);
343 }
344 return string.Format(provider, resourceFormat, p1, p2, p3);
345 }
346
347 internal static string Format(IFormatProvider? provider, string resourceFormat, params object?[]? args)
348 {
349 if (args != null)
350 {
351 if (UsingResourceKeys())
352 {
353 return resourceFormat + ", " + string.Join(", ", args);
354 }
355 return string.Format(provider, resourceFormat, args);
356 }
357 return resourceFormat;
358 }
359}
static bool TryGetSwitch(string switchName, out bool isEnabled)
Definition AppContext.cs:74
virtual ? string GetString(string name)
static string ReadersMustBeDeltaReaders
Definition SR.cs:208
static string InvalidExceptionRegionBounds
Definition SR.cs:240
static string TableRowCountSpaceTooSmall
Definition SR.cs:66
static string UnexpectedSignatureHeader2
Definition SR.cs:166
static string ImageTooSmallOrContainsInvalidOffsetOrCount
Definition SR.cs:124
static string InvalidMethodRva
Definition SR.cs:100
static string GetResourceString(string resourceKey, string defaultString)
Definition SR.cs:270
static string UnexpectedArrayLength
Definition SR.cs:216
static string RowCountOutOfRange
Definition SR.cs:226
static string BuilderAlreadyLinked
Definition SR.cs:182
static string NotMetadataTableOrUserStringHandle
Definition SR.cs:48
static string ValueMustBeMultiple
Definition SR.cs:218
static string ExpectedNonEmptyArray
Definition SR.cs:204
static string StreamTooLarge
Definition SR.cs:122
static string ControlFlowBuilderNotAvailable
Definition SR.cs:190
static string InvalidRowCount
Definition SR.cs:142
static string InvalidMetadataStreamFormat
Definition SR.cs:90
static string InvalidTypeSize
Definition SR.cs:138
static string InvalidPdbChecksumDataFormat
Definition SR.cs:162
static string ExpectedListOfSize
Definition SR.cs:198
static string InvalidSehHeader
Definition SR.cs:34
static string ValueTooLarge
Definition SR.cs:134
static string NotEnoughSpaceForVersionString
Definition SR.cs:76
static string InvalidSerializedString
Definition SR.cs:120
static string NotTypeDefOrRefOrSpecHandle
Definition SR.cs:174
static string InvalidCompressedInteger
Definition SR.cs:112
static string BaseReaderMustBeFullMetadataReader
Definition SR.cs:192
static string Format(string resourceFormat, object? p1)
Definition SR.cs:280
static ResourceManager s_resourceManager
Definition SR.cs:10
static string EnCMapNotSorted
Definition SR.cs:118
static string MustNotReturnNull
Definition SR.cs:220
static string InvalidDirectoryRVA
Definition SR.cs:152
static string UnknownPEMagicValue
Definition SR.cs:56
static string Format(string resourceFormat, object? p1, object? p2, object? p3)
Definition SR.cs:298
static string InvalidPESignature
Definition SR.cs:32
static string NotEnoughSpaceForMetadataStream
Definition SR.cs:88
static string TooManyExceptionRegions
Definition SR.cs:148
static string DataTooBig
Definition SR.cs:230
static string InvalidDirectorySize
Definition SR.cs:154
static string UnexpectedSignatureHeader
Definition SR.cs:164
static string MetadataTablesTooSmall
Definition SR.cs:92
static string UnexpectedValueUnknownType
Definition SR.cs:244
static string MetadataVersionTooLong
Definition SR.cs:222
static string SizeMismatch
Definition SR.cs:228
static string InvalidMethodHeader1
Definition SR.cs:28
static string Format(IFormatProvider? provider, string resourceFormat, object? p1, object? p2)
Definition SR.cs:329
static string LabelNotMarked
Definition SR.cs:236
static string DistanceBetweenInstructionAndLabelTooBig
Definition SR.cs:234
static string InvalidConstantValueOfType
Definition SR.cs:130
static string NotEnoughSpaceForStreamHeaderName
Definition SR.cs:80
static string UnexpectedHandleKind
Definition SR.cs:20
static string TooManySubnamespaces
Definition SR.cs:146
static string InvalidEntryPointToken
Definition SR.cs:144
static string MetadataSignature
Definition SR.cs:74
static string RowIdOrHeapOffsetTooLarge
Definition SR.cs:116
static string InvalidDebugDirectoryEntryCharacteristics
Definition SR.cs:156
static string UnexpectedSignatureTypeCode
Definition SR.cs:170
static string UnexpectedStreamEnd
Definition SR.cs:98
static string MetadataTableNotSorted
Definition SR.cs:58
static string StandaloneDebugMetadataImageDoesNotContainModuleTable
Definition SR.cs:40
static string PEImageDoesNotHaveMetadata
Definition SR.cs:108
static string HeapSizeLimitExceeded
Definition SR.cs:178
static string ReturnedBuilderSizeTooSmall
Definition SR.cs:184
static string ModuleTableInvalidNumberOfRows
Definition SR.cs:60
static string OutOfBoundsRead
Definition SR.cs:68
static string ExpectedNonEmptyList
Definition SR.cs:202
static string MetadataHeaderTooSmall
Definition SR.cs:72
static ResourceManager ResourceManager
Definition SR.cs:12
static string InvalidHandle
Definition SR.cs:18
static string UnknownTables
Definition SR.cs:62
static string RowCountMustBeZero
Definition SR.cs:224
static string Format(string resourceFormat, params object?[]? args)
Definition SR.cs:307
static string ExpectedNonEmptyString
Definition SR.cs:206
static string PEImageNotAvailable
Definition SR.cs:42
static string MissingDataDirectory
Definition SR.cs:44
static string Format(string resourceFormat, object? p1, object? p2)
Definition SR.cs:289
static string InvalidImportDefinitionKind
Definition SR.cs:132
static string NotEnoughSpaceForGUIDStream
Definition SR.cs:86
static string UnexpectedDebugDirectoryType
Definition SR.cs:176
static string SignatureProviderReturnedInvalidSignature
Definition SR.cs:210
static string ExpectedArrayOfSize
Definition SR.cs:200
static string ModuleAlreadyAdded
Definition SR.cs:194
static string UnsupportedFormatVersion
Definition SR.cs:232
static string InvalidNumberOfSections
Definition SR.cs:104
static string StreamMustSupportReadAndSeek
Definition SR.cs:52
static string InvalidCorHeaderSize
Definition SR.cs:16
static string InvalidCodedIndex
Definition SR.cs:110
static string Format(IFormatProvider? provider, string resourceFormat, object? p1, object? p2, object? p3)
Definition SR.cs:338
static string UnexpectedEmbeddedPortablePdbDataSignature
Definition SR.cs:160
static string LabelDoesntBelongToBuilder
Definition SR.cs:188
static string SignatureNotVarArg
Definition SR.cs:186
static string InvalidLocalSignatureToken
Definition SR.cs:24
static string InvalidToken
Definition SR.cs:36
static string NotMetadataHeapHandle
Definition SR.cs:46
static string InvalidMetadataSectionSpan
Definition SR.cs:26
static string WinMDMissingMscorlibRef
Definition SR.cs:96
static string InvalidMethodHeader2
Definition SR.cs:30
static string UnexpectedCodeViewDataSignature
Definition SR.cs:158
static string GetResourceString(string resourceKey)
Definition SR.cs:101
static string Format(IFormatProvider? provider, string resourceFormat, object? p1)
Definition SR.cs:320
static string AssemblyAlreadyAdded
Definition SR.cs:196
static bool UsingResourceKeys()
Definition SR.cs:248
static string InvalidDocumentName
Definition SR.cs:114
static string InvalidSignature
Definition SR.cs:106
static string SectionTooSmall
Definition SR.cs:50
static string UnexpectedOpCode
Definition SR.cs:22
static readonly bool s_usingResourceKeys
Definition SR.cs:8
static string BuilderMustAligned
Definition SR.cs:180
static string StreamHeaderTooSmall
Definition SR.cs:78
static string NotTypeDefOrRefHandle
Definition SR.cs:168
static string HashTooShort
Definition SR.cs:214
static string CantGetOffsetForVirtualHeapHandle
Definition SR.cs:102
static string MetadataImageDoesNotRepresentAnAssembly
Definition SR.cs:38
static string HandleBelongsToFutureGeneration
Definition SR.cs:140
static string NotEnoughSpaceForStringStream
Definition SR.cs:82
static string OutOfBoundsWrite
Definition SR.cs:70
static string MetadataTableHeaderTooSmall
Definition SR.cs:94
static string MetadataStringDecoderEncodingMustBeUtf8
Definition SR.cs:126
static string UnknownSectionName
Definition SR.cs:212
static string ImageTooSmall
Definition SR.cs:14
static string UnreachableLocation
Definition SR.cs:246
static string IllegalTablesInCompressedMetadataStream
Definition SR.cs:64
static string NotEnoughSpaceForBlobStream
Definition SR.cs:84
static string UnknownFileFormat
Definition SR.cs:54
static string UnexpectedValue
Definition SR.cs:242
static string InvalidConstantValue
Definition SR.cs:128
static string Format(IFormatProvider? provider, string resourceFormat, params object?[]? args)
Definition SR.cs:347
static string BlobTooLarge
Definition SR.cs:136
static string MethodHasNoExceptionRegions
Definition SR.cs:238
static string SequencePointValueOutOfRange
Definition SR.cs:150
static string SignatureTypeSequenceMustHaveAtLeastOneElement
Definition SR.cs:172