Пример #1
0
        /// <summary>
        /// Returns a dense list containing all the items from a sequence that satisfy a predicate.
        /// </summary>
        public static DenseList <T> ToDenseList <T> (this IEnumerable <T> enumerable, Func <T, bool> where)
        {
            DenseList <T> result = default;

            result.AddRange(enumerable, where);
            return(result);
        }
Пример #2
0
        /// <summary>
        /// Returns a dense list containing all the items from a sequence.
        /// </summary>
        public static DenseList <T> ToDenseList <T> (this IEnumerable <T> enumerable)
        {
            DenseList <T> result = default;

            if (enumerable != null)
            {
                result.AddRange(enumerable);
            }
            return(result);
        }