mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 05:53:03 +03:00
Remove tabs and trailing whitespace
This commit is contained in:
@@ -5,24 +5,24 @@ using System.Text;
|
||||
|
||||
namespace Rssdp.Infrastructure
|
||||
{
|
||||
internal static class IEnumerableExtensions
|
||||
{
|
||||
public static IEnumerable<T> SelectManyRecursive<T>(this IEnumerable<T> source, Func<T, IEnumerable<T>> selector)
|
||||
{
|
||||
if (source == null) throw new ArgumentNullException("source");
|
||||
if (selector == null) throw new ArgumentNullException("selector");
|
||||
internal static class IEnumerableExtensions
|
||||
{
|
||||
public static IEnumerable<T> SelectManyRecursive<T>(this IEnumerable<T> source, Func<T, IEnumerable<T>> selector)
|
||||
{
|
||||
if (source == null) throw new ArgumentNullException("source");
|
||||
if (selector == null) throw new ArgumentNullException("selector");
|
||||
|
||||
return !source.Any() ? source :
|
||||
source.Concat(
|
||||
source
|
||||
.SelectMany(i => selector(i).EmptyIfNull())
|
||||
.SelectManyRecursive(selector)
|
||||
);
|
||||
}
|
||||
return !source.Any() ? source :
|
||||
source.Concat(
|
||||
source
|
||||
.SelectMany(i => selector(i).EmptyIfNull())
|
||||
.SelectManyRecursive(selector)
|
||||
);
|
||||
}
|
||||
|
||||
public static IEnumerable<T> EmptyIfNull<T>(this IEnumerable<T> source)
|
||||
{
|
||||
return source ?? Enumerable.Empty<T>();
|
||||
}
|
||||
}
|
||||
public static IEnumerable<T> EmptyIfNull<T>(this IEnumerable<T> source)
|
||||
{
|
||||
return source ?? Enumerable.Empty<T>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user