Skip to content

Commit e892993

Browse files
committed
style: 统一异常消息字符串的引号格式
将所有异常消息中的双引号替换为逐字字符串引号,保持代码风格一致
1 parent cc25e8d commit e892993

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

GameFrameX.Foundation.Hash/CrcHelper.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public static int GetCrc32(byte[] bytes)
6969
{
7070
if (bytes == null)
7171
{
72-
throw new ArgumentNullException(nameof(bytes), "Bytes is invalid.");
72+
throw new ArgumentNullException(nameof(bytes), @"Bytes is invalid.");
7373
}
7474

7575
return GetCrc32(bytes, 0, bytes.Length);
@@ -88,7 +88,7 @@ public static int GetCrc32(byte[] bytes, int offset, int length)
8888
{
8989
if (bytes == null)
9090
{
91-
throw new ArgumentNullException(nameof(bytes), "Bytes is invalid.");
91+
throw new ArgumentNullException(nameof(bytes), @"Bytes is invalid.");
9292
}
9393

9494
if (offset < 0 || length < 0 || offset + length > bytes.Length)
@@ -112,7 +112,7 @@ public static int GetCrc32(Stream stream)
112112
{
113113
if (stream == null)
114114
{
115-
throw new ArgumentNullException(nameof(stream), "Stream is invalid.");
115+
throw new ArgumentNullException(nameof(stream), @"Stream is invalid.");
116116
}
117117

118118
while (true)
@@ -166,7 +166,7 @@ public static void GetCrc32Bytes(int crc32, byte[] bytes, int offset)
166166
{
167167
if (bytes == null)
168168
{
169-
throw new ArgumentNullException(nameof(bytes), "Result is invalid.");
169+
throw new ArgumentNullException(nameof(bytes), @"Result is invalid.");
170170
}
171171

172172
if (offset < 0 || offset + 4 > bytes.Length)
@@ -193,12 +193,12 @@ internal static int GetCrc32(Stream stream, byte[] code, int length)
193193
{
194194
if (stream == null)
195195
{
196-
throw new ArgumentNullException(nameof(stream), "Stream is invalid.");
196+
throw new ArgumentNullException(nameof(stream), @"Stream is invalid.");
197197
}
198198

199199
if (code == null)
200200
{
201-
throw new ArgumentNullException(nameof(code), "Code is invalid.");
201+
throw new ArgumentNullException(nameof(code), @"Code is invalid.");
202202
}
203203

204204
var codeLength = code.Length;

0 commit comments

Comments
 (0)