using System; using System.Collections.Generic; using System.Linq; namespace MfGames.Gallium { public static class WhereEntityExtensions { public static IEnumerable WhereEntity( this IEnumerable entities, Func include) { return entities.Where(x => x.Has() && include(x, x.Get())); } public static IEnumerable WhereEntity( this IEnumerable entities, Func include) { return entities.Where( x => x.HasAll() && include(x, x.Get(), x.Get())); } public static IEnumerable WhereEntity( this IEnumerable entities, Func include) { return entities.Where( x => x.HasAll() && include(x, x.Get(), x.Get(), x.Get())); } public static IEnumerable WhereEntity( this IEnumerable entities, Func include) { return entities.Where( x => x.HasAll() && include( x, x.Get(), x.Get(), x.Get(), x.Get())); } } }