Update dependencies (#10)

Fix code style
This commit is contained in:
2021-09-16 13:56:05 +02:00
committed by GitHub
parent d20e5bd308
commit 57925151fa
28 changed files with 378 additions and 256 deletions
@@ -22,7 +22,10 @@ namespace System.Extensions
public static ICollection<T> ClearAnd<T>(this ICollection<T> collection)
{
if (collection is null) throw new ArgumentNullException(nameof(collection));
if (collection is null)
{
throw new ArgumentNullException(nameof(collection));
}
collection.Clear();
return collection;
@@ -30,10 +33,17 @@ namespace System.Extensions
public static ICollection<T> AddRange<T>(this ICollection<T> collection, IEnumerable<T> values)
{
if (collection is null) throw new ArgumentNullException(nameof(collection));
if (values is null) throw new ArgumentNullException(nameof(values));
if (collection is null)
{
throw new ArgumentNullException(nameof(collection));
}
foreach(var item in values)
if (values is null)
{
throw new ArgumentNullException(nameof(values));
}
foreach (var item in values)
{
collection.Add(item);
}
@@ -43,8 +53,15 @@ namespace System.Extensions
public static int IndexOfWhere<T>(this ICollection<T> collection, Func<T, bool> selector)
{
if (collection is null) throw new ArgumentNullException(nameof(collection));
if (selector is null) throw new ArgumentNullException(nameof(selector));
if (collection is null)
{
throw new ArgumentNullException(nameof(collection));
}
if (selector is null)
{
throw new ArgumentNullException(nameof(selector));
}
var index = 0;
foreach (var item in collection)