Skip to content

Commit f6b604a

Browse files
committed
Add dot to exception messages in remaining call sites
1 parent 102ba32 commit f6b604a

File tree

21 files changed

+38
-38
lines changed

21 files changed

+38
-38
lines changed

CommunityToolkit.Common/Collections/ObservableGroupedCollectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static ObservableGroup<TKey, TValue> First<TKey, TValue>(this ObservableG
3434
{
3535
static void ThrowArgumentExceptionForKeyNotFound()
3636
{
37-
throw new InvalidOperationException("The requested key was not present in the collection");
37+
throw new InvalidOperationException("The requested key was not present in the collection.");
3838
}
3939

4040
ThrowArgumentExceptionForKeyNotFound();

CommunityToolkit.Common/Extensions/ISettingsStorageHelperExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ public static void Delete<TKey>(this ISettingsStorageHelper<TKey> storageHelper,
7676

7777
private static void ThrowKeyNotFoundException<TKey>(TKey key)
7878
{
79-
throw new KeyNotFoundException($"The given key '{key}' was not present");
79+
throw new KeyNotFoundException($"The given key '{key}' was not present.");
8080
}
8181
}

CommunityToolkit.HighPerformance/Box{T}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public sealed class Box<T>
6161
/// <exception cref="InvalidOperationException">Always thrown when this constructor is used (eg. from reflection).</exception>
6262
private Box()
6363
{
64-
throw new InvalidOperationException("The CommunityToolkit.HighPerformance.Box<T> constructor should never be used");
64+
throw new InvalidOperationException("The CommunityToolkit.HighPerformance.Box<T> constructor should never be used.");
6565
}
6666

6767
/// <summary>

CommunityToolkit.HighPerformance/Buffers/ArrayPoolBufferWriter{T}.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,30 +339,30 @@ public override string ToString()
339339
/// </summary>
340340
private static void ThrowArgumentOutOfRangeExceptionForNegativeCount()
341341
{
342-
throw new ArgumentOutOfRangeException("count", "The count can't be a negative value");
342+
throw new ArgumentOutOfRangeException("count", "The count can't be a negative value.");
343343
}
344344

345345
/// <summary>
346346
/// Throws an <see cref="ArgumentOutOfRangeException"/> when the size hint is negative.
347347
/// </summary>
348348
private static void ThrowArgumentOutOfRangeExceptionForNegativeSizeHint()
349349
{
350-
throw new ArgumentOutOfRangeException("sizeHint", "The size hint can't be a negative value");
350+
throw new ArgumentOutOfRangeException("sizeHint", "The size hint can't be a negative value.");
351351
}
352352

353353
/// <summary>
354354
/// Throws an <see cref="ArgumentOutOfRangeException"/> when the requested count is negative.
355355
/// </summary>
356356
private static void ThrowArgumentExceptionForAdvancedTooFar()
357357
{
358-
throw new ArgumentException("The buffer writer has advanced too far");
358+
throw new ArgumentException("The buffer writer has advanced too far.");
359359
}
360360

361361
/// <summary>
362362
/// Throws an <see cref="ObjectDisposedException"/> when <see cref="array"/> is <see langword="null"/>.
363363
/// </summary>
364364
private static void ThrowObjectDisposedException()
365365
{
366-
throw new ObjectDisposedException("The current buffer has already been disposed");
366+
throw new ObjectDisposedException("The current buffer has already been disposed.");
367367
}
368368
}

CommunityToolkit.HighPerformance/Buffers/MemoryBufferWriter{T}.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,30 +162,30 @@ public override string ToString()
162162
/// </summary>
163163
private static void ThrowArgumentOutOfRangeExceptionForNegativeCount()
164164
{
165-
throw new ArgumentOutOfRangeException("count", "The count can't be a negative value");
165+
throw new ArgumentOutOfRangeException("count", "The count can't be a negative value.");
166166
}
167167

168168
/// <summary>
169169
/// Throws an <see cref="ArgumentOutOfRangeException"/> when the size hint is negative.
170170
/// </summary>
171171
private static void ThrowArgumentOutOfRangeExceptionForNegativeSizeHint()
172172
{
173-
throw new ArgumentOutOfRangeException("sizeHint", "The size hint can't be a negative value");
173+
throw new ArgumentOutOfRangeException("sizeHint", "The size hint can't be a negative value.");
174174
}
175175

176176
/// <summary>
177177
/// Throws an <see cref="ArgumentOutOfRangeException"/> when the requested count is negative.
178178
/// </summary>
179179
private static void ThrowArgumentExceptionForAdvancedTooFar()
180180
{
181-
throw new ArgumentException("The buffer writer has advanced too far");
181+
throw new ArgumentException("The buffer writer has advanced too far.");
182182
}
183183

184184
/// <summary>
185185
/// Throws an <see cref="ArgumentException"/> when the requested size exceeds the capacity.
186186
/// </summary>
187187
private static void ThrowArgumentExceptionForCapacityExceeded()
188188
{
189-
throw new ArgumentException("The buffer writer doesn't have enough capacity left");
189+
throw new ArgumentException("The buffer writer doesn't have enough capacity left.");
190190
}
191191
}

CommunityToolkit.HighPerformance/Enumerables/ReadOnlyRefEnumerable{T}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,6 @@ private static void ThrowArgumentOutOfRangeExceptionForStep()
464464
/// </summary>
465465
private static void ThrowArgumentExceptionForDestinationTooShort()
466466
{
467-
throw new ArgumentException("The target span is too short to copy all the current items to");
467+
throw new ArgumentException("The target span is too short to copy all the current items to.");
468468
}
469469
}

CommunityToolkit.HighPerformance/Enumerables/RefEnumerable{T}.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,6 @@ private static void ThrowArgumentOutOfRangeExceptionForStep()
552552
/// </summary>
553553
private static void ThrowArgumentExceptionForDestinationTooShort()
554554
{
555-
throw new ArgumentException("The target span is too short to copy all the current items to");
555+
throw new ArgumentException("The target span is too short to copy all the current items to.");
556556
}
557557
}

CommunityToolkit.HighPerformance/Extensions/ArrayExtensions.2D.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ public static bool IsCovariant<T>(this T[,] array)
451451
/// </summary>
452452
private static void ThrowArrayTypeMismatchException()
453453
{
454-
throw new ArrayTypeMismatchException("The given array doesn't match the specified type T");
454+
throw new ArrayTypeMismatchException("The given array doesn't match the specified type T.");
455455
}
456456

457457
/// <summary>

CommunityToolkit.HighPerformance/Extensions/StreamExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,6 @@ public static void Write<T>(this Stream stream, in T value)
247247
/// </summary>
248248
private static void ThrowInvalidOperationExceptionForEndOfStream()
249249
{
250-
throw new InvalidOperationException("The stream didn't contain enough data to read the requested item");
250+
throw new InvalidOperationException("The stream didn't contain enough data to read the requested item.");
251251
}
252252
}

CommunityToolkit.HighPerformance/Memory/Internals/ThrowHelper.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,39 +16,39 @@ internal static class ThrowHelper
1616
/// </summary>
1717
public static void ThrowArgumentExceptionForManagedType()
1818
{
19-
throw new ArgumentException("Can't use a void* constructor when T is a managed type");
19+
throw new ArgumentException("Can't use a void* constructor when T is a managed type.");
2020
}
2121

2222
/// <summary>
2323
/// Throws an <see cref="ArgumentException"/> when the target span is too short.
2424
/// </summary>
2525
public static void ThrowArgumentExceptionForDestinationTooShort()
2626
{
27-
throw new ArgumentException("The target span is too short to copy all the current items to");
27+
throw new ArgumentException("The target span is too short to copy all the current items to.");
2828
}
2929

3030
/// <summary>
3131
/// Throws an <see cref="ArgumentException"/> when the target span does not have the same shape as the source.
3232
/// </summary>
3333
public static void ThrowArgumentExceptionForDestinationWithNotSameShape()
3434
{
35-
throw new ArgumentException("The target span does not have the same shape as the source one");
35+
throw new ArgumentException("The target span does not have the same shape as the source one.");
3636
}
3737

3838
/// <summary>
3939
/// Throws an <see cref="ArrayTypeMismatchException"/> when using an array of an invalid type.
4040
/// </summary>
4141
public static void ThrowArrayTypeMismatchException()
4242
{
43-
throw new ArrayTypeMismatchException("The given array doesn't match the specified type T");
43+
throw new ArrayTypeMismatchException("The given array doesn't match the specified type T.");
4444
}
4545

4646
/// <summary>
4747
/// Throws an <see cref="ArgumentException"/> when using an array of an invalid type.
4848
/// </summary>
4949
public static void ThrowArgumentExceptionForUnsupportedType()
5050
{
51-
throw new ArgumentException("The specified object type is not supported");
51+
throw new ArgumentException("The specified object type is not supported.");
5252
}
5353

5454
/// <summary>
@@ -68,7 +68,7 @@ public static void ThrowIndexOutOfRangeException()
6868
/// </summary>
6969
public static void ThrowArgumentException()
7070
{
71-
throw new ArgumentException("One or more input parameters were invalid");
71+
throw new ArgumentException("One or more input parameters were invalid.");
7272
}
7373

7474
/// <summary>

0 commit comments

Comments
 (0)