mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
fix: check if arguments are null in TryParseSkipFailures
This commit is contained in:
parent
1763d1773a
commit
ce5288956e
1 changed files with 6 additions and 0 deletions
|
|
@ -1081,6 +1081,12 @@ namespace ICD.Common.Utils.Extensions
|
||||||
/// <returns>enumerable of successfully parsed values</returns>
|
/// <returns>enumerable of successfully parsed values</returns>
|
||||||
public static IEnumerable<T> TryParseSkipFailures<T>(this IEnumerable<string> extends, TryParseDelegate<T> tryParseFunc)
|
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 =>
|
return extends.Select(str =>
|
||||||
{
|
{
|
||||||
T value = default(T);
|
T value = default(T);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue