/// <summary> Sorts list of book by chosen tag.</summary> /// <param name="tag"> Tag to sort by. </param> /// <returns> Sorted list of book by tag.</returns> public List <Book> SortBooksByTag(Sorts.ISortable tag) { if (tag == null) { throw new ArgumentNullException("Tag can't be null!"); } return(tag.SortBooksByTag(BookList).ToList()); }
/// <summary> Sorts list of book by chosen tag.</summary> /// <param name="tag"> Tag to sort by. </param> /// <returns> Sorted list of book by tag.</returns> public List <Book> SortBooksByTag(Sorts.ISortable tag) { if (tag == null) { logger.Error("Sort tag can't be null!"); throw new ArgumentNullException("Tag can't be null!"); } logger.Debug("Sorting by tag"); return(tag.SortBooksByTag(BookList).ToList()); }