Exemplo n.º 1
0
        /// <summary>
        /// Filters the collection according to the added filters.
        /// If no filters have been applied, then the original collection
        /// is returned
        ///
        /// the collection to be filtered
        /// a filtered collection
        /// </summary>
        public IList Filter(IList collection)
        {
            // no filters have been added. Return the same collection
            if (_FilterList.Count == 0)
            {
                return(collection);
            }
            FilterOperation filterOp = new FilterOperation(_ObjectType, _CollectionType, _Clause, _FilterList, _Operand);

            filterOp.Filter(collection, _FilteredCollection);
            return(_FilteredCollection);
        }