|
@@ -12,13 +12,8 @@ namespace System.Linq
|
|
|
{
|
|
|
public static partial class AsyncEnumerable
|
|
|
{
|
|
|
- public static IAsyncEnumerable<TSource> DefaultIfEmpty<TSource>(this IAsyncEnumerable<TSource> source)
|
|
|
- {
|
|
|
- if (source == null)
|
|
|
- throw Error.ArgumentNull(nameof(source));
|
|
|
-
|
|
|
- return new DefaultIfEmptyAsyncIterator<TSource>(source, default);
|
|
|
- }
|
|
|
+ public static IAsyncEnumerable<TSource> DefaultIfEmpty<TSource>(this IAsyncEnumerable<TSource> source) =>
|
|
|
+ DefaultIfEmpty(source, default);
|
|
|
|
|
|
public static IAsyncEnumerable<TSource> DefaultIfEmpty<TSource>(this IAsyncEnumerable<TSource> source, TSource defaultValue)
|
|
|
{
|