using System.Collections.Generic; using System.Linq; namespace CTA.FeatureDetection.Common.Extensions { public static class EnumerableExtensions { /// /// Determines if an enumerable is null or contains zero items /// /// Type of items in collection /// Collection being checked /// Whether or not the collection is null or contains zero items public static bool IsNullOrEmpty(this IEnumerable enumerable) { return enumerable == null || !enumerable.Any(); } } }