mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-10 04:55:42 +00:00
Add argument null check (#42)
This commit is contained in:
parent
2547d4a227
commit
e757ce08a0
@ -1,4 +1,4 @@
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Web;
|
||||
|
||||
namespace X10D.Collections;
|
||||
@ -226,6 +226,11 @@ public static class DictionaryExtensions
|
||||
throw new ArgumentNullException(nameof(source));
|
||||
}
|
||||
|
||||
if (selector is null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(selector));
|
||||
}
|
||||
|
||||
static string SanitizeValue(string? value)
|
||||
{
|
||||
if (value is null)
|
||||
@ -268,6 +273,16 @@ public static class DictionaryExtensions
|
||||
throw new ArgumentNullException(nameof(source));
|
||||
}
|
||||
|
||||
if (keySelector is null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(keySelector));
|
||||
}
|
||||
|
||||
if (valueSelector is null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(valueSelector));
|
||||
}
|
||||
|
||||
static string SanitizeValue(string? value)
|
||||
{
|
||||
if (value is null)
|
||||
@ -371,6 +386,11 @@ public static class DictionaryExtensions
|
||||
throw new ArgumentNullException(nameof(source));
|
||||
}
|
||||
|
||||
if (keySelector is null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(keySelector));
|
||||
}
|
||||
|
||||
if (valueSelector is null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(valueSelector));
|
||||
|
Loading…
Reference in New Issue
Block a user