Ejemplo n.º 1
0
        /// <summary>
        ///     Finds all.
        /// </summary>
        /// <param name="match">The match.</param>
        /// <returns></returns>
        public EventedList <T> FindAll(Predicate <T> match)
        {
            if (match == null)
            {
                throw new ArgumentNullException(nameof(match));
            }
            var list = new EventedList <T>();

            for (var i = 0; i < Count; i++)
            {
                if (match(internalItems[i]))
                {
                    list.Add(internalItems[i]);
                }
            }
            return(list);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Finds all.
        /// </summary>
        /// <param name="match">The match.</param>
        /// <returns></returns>
        public EventedList <T> FindAll(Predicate <T> match)
        {
            if (match == null)
            {
                throw new ArgumentNullException(nameof(match));
            }
            EventedList <T> list = new EventedList <T>();

            for (int i = 0; i < _size; i++)
            {
                if (match(_items[i]))
                {
                    list.Add(_items[i]);
                }
            }
            return(list);
        }