Skip to content

Commit

Permalink
Merge 37984a6 into dd8e8a8
Browse files Browse the repository at this point in the history
  • Loading branch information
atifaziz authored Oct 23, 2023
2 parents dd8e8a8 + 37984a6 commit 40023eb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion MoreLinq.Test/NullArgumentTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ static bool CanBeNull(ParameterInfo parameter)
nameof(MoreEnumerable.From) + ".function1",
nameof(MoreEnumerable.From) + ".function2",
nameof(MoreEnumerable.From) + ".function3",
nameof(MoreEnumerable.ToDataTable) + ".expressions",
nameof(MoreEnumerable.Trace) + ".format"
};

Expand Down
5 changes: 1 addition & 4 deletions MoreLinq/ToDataTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@ public static TTable ToDataTable<T, TTable>(this IEnumerable<T> source, TTable t
{
if (source == null) throw new ArgumentNullException(nameof(source));
if (table == null) throw new ArgumentNullException(nameof(table));

// TODO disallow null for "expressions" in next major update

expressions ??= EmptyArray<Expression<Func<T, object?>>>.Value;
if (expressions == null) throw new ArgumentNullException(nameof(expressions));

var members = PrepareMemberInfos(expressions).ToArray();
var boundMembers = BuildOrBindSchema(table, members);
Expand Down

0 comments on commit 40023eb

Please sign in to comment.