fix: check if arguments are null in TryParseSkipFailures

This commit is contained in:
Jeffery Thompson
2018-03-30 15:50:50 -04:00
parent 1763d1773a
commit ce5288956e

View File

@@ -1081,6 +1081,12 @@ namespace ICD.Common.Utils.Extensions
/// <returns>enumerable of successfully parsed values</returns>
public static IEnumerable<T> TryParseSkipFailures<T>(this IEnumerable<string> extends, TryParseDelegate<T> tryParseFunc)
{
if (extends == null)
throw new ArgumentNullException("extends");
if (tryParseFunc == null)
throw new ArgumentNullException("tryParseFunc");
return extends.Select(str =>
{
T value = default(T);