Exemplo n.º 1
0
        /// <inheritdoc />
        public IFilterableQuery <T> ApplyFilter(IQueryFilter <T> filter)
        {
            IFilterableQuery <T> filterableQuery = new WrappedFilterableQuery <T, IFilterableQuery <T> >(this);

            filter.Apply(filterableQuery);

            return(this);
        }
        /// <inheritdoc />
        /// <exception cref="ArgumentNullException">
        ///     <paramref name="filter" /> is null.
        /// </exception>
        public TQuery ApplyFilter(IQueryFilter <TSource> filter)
        {
            if (filter == null)
            {
                throw new ArgumentNullException("filter");
            }

            IFilterableQuery <TSource> filterableQuery = new WrappedFilterableQuery <TSource, TQuery>(Query);

            filter.Apply(filterableQuery);

            return(Query);
        }