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 ArgumentOutOfRange_InvalidThreshold => GetResourceString("ArgumentOutOfRange_InvalidThreshold");
15
16 internal static string Argument_ItemNotExist => GetResourceString("Argument_ItemNotExist");
17
18 internal static string Argument_AddingDuplicate => GetResourceString("Argument_AddingDuplicate");
19
20 internal static string Arg_NonZeroLowerBound => GetResourceString("Arg_NonZeroLowerBound");
21
22 internal static string Arg_ArrayPlusOffTooSmall => GetResourceString("Arg_ArrayPlusOffTooSmall");
23
24 internal static string ArgumentOutOfRange_NeedNonNegNum => GetResourceString("ArgumentOutOfRange_NeedNonNegNum");
25
26 internal static string IndexCannotBeNegative => GetResourceString("IndexCannotBeNegative");
27
28 internal static string NotSupported_ReadOnlyCollection => GetResourceString("NotSupported_ReadOnlyCollection");
29
30 internal static string ObservableCollectionReentrancyNotAllowed => GetResourceString("ObservableCollectionReentrancyNotAllowed");
31
32 internal static string WrongActionForCtor => GetResourceString("WrongActionForCtor");
33
34 internal static string MustBeResetAddOrRemoveActionForCtor => GetResourceString("MustBeResetAddOrRemoveActionForCtor");
35
36 internal static string ResetActionRequiresNullItem => GetResourceString("ResetActionRequiresNullItem");
37
38 internal static string ResetActionRequiresIndexMinus1 => GetResourceString("ResetActionRequiresIndexMinus1");
39
40 internal static string Arg_RankMultiDimNotSupported => GetResourceString("Arg_RankMultiDimNotSupported");
41
42 internal static string Argument_InvalidArrayType => GetResourceString("Argument_InvalidArrayType");
43
44 internal static string Arg_KeyNotFoundWithKey => GetResourceString("Arg_KeyNotFoundWithKey");
45
46 private static bool UsingResourceKeys()
47 {
49 }
50
51 internal static string GetResourceString(string resourceKey)
52 {
54 {
55 return resourceKey;
56 }
57 string result = null;
58 try
59 {
60 result = ResourceManager.GetString(resourceKey);
61 }
63 {
64 }
65 return result;
66 }
67
68 internal static string Format(string resourceFormat, object p1)
69 {
71 {
72 return string.Join(", ", resourceFormat, p1);
73 }
74 return string.Format(resourceFormat, p1);
75 }
76}
static bool TryGetSwitch(string switchName, out bool isEnabled)
Definition AppContext.cs:74
virtual ? string GetString(string name)
static string NotSupported_ReadOnlyCollection
Definition SR.cs:28
static string ObservableCollectionReentrancyNotAllowed
Definition SR.cs:30
static ResourceManager s_resourceManager
Definition SR.cs:10
static string Format(string resourceFormat, object p1)
Definition SR.cs:68
static string Arg_ArrayPlusOffTooSmall
Definition SR.cs:16
static string Argument_AddingDuplicate
Definition SR.cs:14
static string Argument_InvalidArrayType
Definition SR.cs:54
static string Arg_NonZeroLowerBound
Definition SR.cs:14
static string MustBeResetAddOrRemoveActionForCtor
Definition SR.cs:34
static ResourceManager ResourceManager
Definition SR.cs:12
static string IndexCannotBeNegative
Definition SR.cs:26
static string Arg_RankMultiDimNotSupported
Definition SR.cs:18
static string ResetActionRequiresIndexMinus1
Definition SR.cs:38
static string ResetActionRequiresNullItem
Definition SR.cs:36
static string GetResourceString(string resourceKey)
Definition SR.cs:101
static bool UsingResourceKeys()
Definition SR.cs:46
static readonly bool s_usingResourceKeys
Definition SR.cs:8
static string ArgumentOutOfRange_InvalidThreshold
Definition SR.cs:14
static string Argument_ItemNotExist
Definition SR.cs:16
static string WrongActionForCtor
Definition SR.cs:32
static string ArgumentOutOfRange_NeedNonNegNum
Definition SR.cs:32
static string Arg_KeyNotFoundWithKey
Definition SR.cs:94