Got at least one data fetching method working; turns out, we can't use a patched LogicStack to get the data
This commit is contained in:
43
Vendor/Swan.Lite-3.1.0/Extensions.Enumerable.cs
vendored
Normal file
43
Vendor/Swan.Lite-3.1.0/Extensions.Enumerable.cs
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Swan
|
||||
{
|
||||
/// <summary>
|
||||
/// This class contains extension methods for types implementing IEnumerable<TSource>
|
||||
/// </summary>
|
||||
public static class EnumerableExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// This method returns the <see cref="Enumerable.Union{TSource}">Union</see>
|
||||
/// of all non-null parameters.
|
||||
/// </summary>
|
||||
/// <typeparam name="TSource">The type of the elements of the input sequences.</typeparam>
|
||||
/// <param name="this">An IEnumerable<TSource> whose distinct elements forms the first set of the union.</param>
|
||||
/// <param name="second">An IEnumerable<TSource> whose distinct elements forms the second set of the union.</param>
|
||||
/// <returns>
|
||||
/// An <see cref="IEnumerable{TSource}" /> that contains the elements from non-null input sequences, excluding duplicates.
|
||||
/// </returns>
|
||||
public static IEnumerable<TSource> UnionExcludingNulls<TSource>(this IEnumerable<TSource> @this, IEnumerable<TSource> second)
|
||||
=> Enumerable.Union(
|
||||
@this ?? Enumerable.Empty<TSource>(),
|
||||
second ?? Enumerable.Empty<TSource>());
|
||||
|
||||
/// <summary>
|
||||
/// This method returns the <see cref="Enumerable.Union{TSource}">Union</see>
|
||||
/// of all non-null parameters.
|
||||
/// </summary>
|
||||
/// <typeparam name="TSource">The type of the elements of the input sequences.</typeparam>
|
||||
/// <param name="this">An IEnumerable<TSource> whose distinct elements forms the first set of the union.</param>
|
||||
/// <param name="second">An IEnumerable<TSource> whose distinct elements forms the second set of the union.</param>
|
||||
/// <param name="comparer">The IEqualityComparer<TSource> to compare values.</param>
|
||||
/// <returns>
|
||||
/// An <see cref="IEnumerable{TSource}" /> that contains the elements from non-null input sequences, excluding duplicates.
|
||||
/// </returns>
|
||||
public static IEnumerable<TSource> UnionExcludingNulls<TSource>(this IEnumerable<TSource> @this, IEnumerable<TSource> second, IEqualityComparer<TSource> comparer)
|
||||
=> Enumerable.Union(
|
||||
@this ?? Enumerable.Empty<TSource>(),
|
||||
second ?? Enumerable.Empty<TSource>(),
|
||||
comparer);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user