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:
25
Vendor/Swan.Lite-3.1.0/Extensions.IEnumerable.cs
vendored
Normal file
25
Vendor/Swan.Lite-3.1.0/Extensions.IEnumerable.cs
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Swan
|
||||
{
|
||||
/// <summary>
|
||||
/// This class contains extensions methods for IEnumerable
|
||||
/// </summary>
|
||||
public static class IEnumerableExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// This method make an union of two IEnumerables
|
||||
/// validation when some of them is null.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">T</typeparam>
|
||||
/// <param name="this">The this.</param>
|
||||
/// <param name="second">The second.</param>
|
||||
/// <returns> The Union </returns>
|
||||
public static IEnumerable<T> UnionNull<T>(this IEnumerable<T> @this, IEnumerable<T> second)
|
||||
{
|
||||
if (@this == null) return second;
|
||||
return second == null ? @this : @this.Union(second);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user