//public delegate List<Book> Filter(List<Book> bookList);
 public List<Book> GetBooks(Func<List<Book>, List<Book>> myFilter)
 {
     List<Book> bookList = BookHelper.GetBookList();
     if (myFilter == null)
     {
         return bookList;
     }
     return myFilter(bookList);
 }
Example #2
0
        public List <Book> GetBooks(Filter myFilter)
        {
            List <Book> bookList = BookHelper.GetBookList();

            if (myFilter == null)
            {
                return(bookList);
            }
            return(myFilter(bookList));
        }