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_ConsoleWindowBufferSize => GetResourceString("ArgumentOutOfRange_ConsoleWindowBufferSize");
15
16 internal static string ArgumentOutOfRange_ConsoleWindowSize_Size => GetResourceString("ArgumentOutOfRange_ConsoleWindowSize_Size");
17
18 internal static string ArgumentOutOfRange_NeedNonNegNum => GetResourceString("ArgumentOutOfRange_NeedNonNegNum");
19
20 internal static string ArgumentOutOfRange_NeedPosNum => GetResourceString("ArgumentOutOfRange_NeedPosNum");
21
22 internal static string ArgumentNull_Buffer => GetResourceString("ArgumentNull_Buffer");
23
24 internal static string Argument_InvalidOffLen => GetResourceString("Argument_InvalidOffLen");
25
26 internal static string NotSupported_UnseekableStream => GetResourceString("NotSupported_UnseekableStream");
27
28 internal static string ObjectDisposed_FileClosed => GetResourceString("ObjectDisposed_FileClosed");
29
30 internal static string NotSupported_UnwritableStream => GetResourceString("NotSupported_UnwritableStream");
31
32 internal static string NotSupported_UnreadableStream => GetResourceString("NotSupported_UnreadableStream");
33
34 internal static string IO_AlreadyExists_Name => GetResourceString("IO_AlreadyExists_Name");
35
36 internal static string IO_FileExists_Name => GetResourceString("IO_FileExists_Name");
37
38 internal static string IO_FileNotFound => GetResourceString("IO_FileNotFound");
39
40 internal static string IO_FileNotFound_FileName => GetResourceString("IO_FileNotFound_FileName");
41
42 internal static string IO_PathNotFound_NoPathName => GetResourceString("IO_PathNotFound_NoPathName");
43
44 internal static string IO_PathNotFound_Path => GetResourceString("IO_PathNotFound_Path");
45
46 internal static string IO_PathTooLong => GetResourceString("IO_PathTooLong");
47
48 internal static string UnauthorizedAccess_IODenied_NoPathName => GetResourceString("UnauthorizedAccess_IODenied_NoPathName");
49
50 internal static string UnauthorizedAccess_IODenied_Path => GetResourceString("UnauthorizedAccess_IODenied_Path");
51
52 internal static string IO_SharingViolation_File => GetResourceString("IO_SharingViolation_File");
53
54 internal static string IO_SharingViolation_NoFileName => GetResourceString("IO_SharingViolation_NoFileName");
55
56 internal static string Arg_InvalidConsoleColor => GetResourceString("Arg_InvalidConsoleColor");
57
58 internal static string IO_NoConsole => GetResourceString("IO_NoConsole");
59
60 internal static string InvalidOperation_ConsoleReadKeyOnFile => GetResourceString("InvalidOperation_ConsoleReadKeyOnFile");
61
62 internal static string ArgumentOutOfRange_ConsoleKey => GetResourceString("ArgumentOutOfRange_ConsoleKey");
63
64 internal static string ArgumentOutOfRange_ConsoleBufferBoundaries => GetResourceString("ArgumentOutOfRange_ConsoleBufferBoundaries");
65
66 internal static string ArgumentOutOfRange_ConsoleWindowPos => GetResourceString("ArgumentOutOfRange_ConsoleWindowPos");
67
68 internal static string InvalidOperation_ConsoleKeyAvailableOnFile => GetResourceString("InvalidOperation_ConsoleKeyAvailableOnFile");
69
70 internal static string ArgumentOutOfRange_ConsoleBufferLessThanWindowSize => GetResourceString("ArgumentOutOfRange_ConsoleBufferLessThanWindowSize");
71
72 internal static string ArgumentOutOfRange_CursorSize => GetResourceString("ArgumentOutOfRange_CursorSize");
73
74 internal static string ArgumentOutOfRange_BeepFrequency => GetResourceString("ArgumentOutOfRange_BeepFrequency");
75
76 internal static string ArgumentNull_Array => GetResourceString("ArgumentNull_Array");
77
78 internal static string ArgumentOutOfRange_IndexCountBuffer => GetResourceString("ArgumentOutOfRange_IndexCountBuffer");
79
80 internal static string ArgumentOutOfRange_IndexCount => GetResourceString("ArgumentOutOfRange_IndexCount");
81
82 internal static string ArgumentOutOfRange_Index => GetResourceString("ArgumentOutOfRange_Index");
83
84 internal static string Argument_EncodingConversionOverflowBytes => GetResourceString("Argument_EncodingConversionOverflowBytes");
85
86 internal static string Argument_EncodingConversionOverflowChars => GetResourceString("Argument_EncodingConversionOverflowChars");
87
88 internal static string ArgumentOutOfRange_GetByteCountOverflow => GetResourceString("ArgumentOutOfRange_GetByteCountOverflow");
89
90 internal static string ArgumentOutOfRange_GetCharCountOverflow => GetResourceString("ArgumentOutOfRange_GetCharCountOverflow");
91
92 internal static string Argument_InvalidCharSequenceNoIndex => GetResourceString("Argument_InvalidCharSequenceNoIndex");
93
94 internal static string IO_PathTooLong_Path => GetResourceString("IO_PathTooLong_Path");
95
96 private static bool UsingResourceKeys()
97 {
99 }
100
101 internal static string GetResourceString(string resourceKey)
102 {
103 if (UsingResourceKeys())
104 {
105 return resourceKey;
106 }
107 string result = null;
108 try
109 {
110 result = ResourceManager.GetString(resourceKey);
111 }
113 {
114 }
115 return result;
116 }
117
118 internal static string Format(string resourceFormat, object p1)
119 {
120 if (UsingResourceKeys())
121 {
122 return string.Join(", ", resourceFormat, p1);
123 }
124 return string.Format(resourceFormat, p1);
125 }
126
127 internal static string Format(string resourceFormat, object p1, object p2)
128 {
129 if (UsingResourceKeys())
130 {
131 return string.Join(", ", resourceFormat, p1, p2);
132 }
133 return string.Format(resourceFormat, p1, p2);
134 }
135}
static bool TryGetSwitch(string switchName, out bool isEnabled)
Definition AppContext.cs:74
virtual ? string GetString(string name)
static string ArgumentOutOfRange_Index
Definition SR.cs:30
static string IO_FileExists_Name
Definition SR.cs:36
static string IO_PathTooLong
Definition SR.cs:46
static string ArgumentOutOfRange_NeedPosNum
Definition SR.cs:20
static string Argument_EncodingConversionOverflowBytes
Definition SR.cs:84
static string ArgumentOutOfRange_ConsoleWindowSize_Size
Definition SR.cs:16
static string Argument_InvalidCharSequenceNoIndex
Definition SR.cs:92
static string IO_AlreadyExists_Name
Definition SR.cs:34
static string ArgumentOutOfRange_IndexCount
Definition SR.cs:80
static ResourceManager s_resourceManager
Definition SR.cs:10
static string ArgumentOutOfRange_ConsoleWindowPos
Definition SR.cs:66
static string ArgumentOutOfRange_GetCharCountOverflow
Definition SR.cs:90
static string ArgumentOutOfRange_ConsoleKey
Definition SR.cs:62
static string Argument_EncodingConversionOverflowChars
Definition SR.cs:86
static string ArgumentOutOfRange_BeepFrequency
Definition SR.cs:74
static string ArgumentOutOfRange_ConsoleWindowBufferSize
Definition SR.cs:14
static string ArgumentOutOfRange_GetByteCountOverflow
Definition SR.cs:88
static string InvalidOperation_ConsoleKeyAvailableOnFile
Definition SR.cs:68
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string IO_NoConsole
Definition SR.cs:58
static string Format(string resourceFormat, object p1, object p2)
Definition SR.cs:127
static string NotSupported_UnseekableStream
Definition SR.cs:26
static string ArgumentOutOfRange_IndexCountBuffer
Definition SR.cs:78
static string NotSupported_UnwritableStream
Definition SR.cs:30
static string ArgumentNull_Array
Definition SR.cs:24
static string ArgumentOutOfRange_CursorSize
Definition SR.cs:72
static ResourceManager ResourceManager
Definition SR.cs:12
static string IO_SharingViolation_File
Definition SR.cs:52
static string InvalidOperation_ConsoleReadKeyOnFile
Definition SR.cs:60
static string UnauthorizedAccess_IODenied_Path
Definition SR.cs:50
static string IO_SharingViolation_NoFileName
Definition SR.cs:54
static string IO_PathNotFound_NoPathName
Definition SR.cs:42
static string ArgumentOutOfRange_ConsoleBufferBoundaries
Definition SR.cs:64
static string Arg_InvalidConsoleColor
Definition SR.cs:56
static string IO_FileNotFound
Definition SR.cs:38
static string IO_FileNotFound_FileName
Definition SR.cs:40
static string NotSupported_UnreadableStream
Definition SR.cs:32
static string ArgumentNull_Buffer
Definition SR.cs:22
static string GetResourceString(string resourceKey)
Definition SR.cs:101
static bool UsingResourceKeys()
Definition SR.cs:96
static string Argument_InvalidOffLen
Definition SR.cs:22
static readonly bool s_usingResourceKeys
Definition SR.cs:8
static string ArgumentOutOfRange_ConsoleBufferLessThanWindowSize
Definition SR.cs:70
static string ArgumentOutOfRange_NeedNonNegNum
Definition SR.cs:32
static string IO_PathTooLong_Path
Definition SR.cs:94
static string ObjectDisposed_FileClosed
Definition SR.cs:28
static string IO_PathNotFound_Path
Definition SR.cs:44
static string UnauthorizedAccess_IODenied_NoPathName
Definition SR.cs:48