diff --git a/X10D/src/Collections/DictionaryExtensions.cs b/X10D/src/Collections/DictionaryExtensions.cs index 0c26126..c016654 100644 --- a/X10D/src/Collections/DictionaryExtensions.cs +++ b/X10D/src/Collections/DictionaryExtensions.cs @@ -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));