using w21library.classes.Intf; namespace w21library.classes { public class Library : ILibrary { protected List BookList = new List(); public IEnumerable GetActiveBooks() { List activeBookList = new List(); foreach (var book in BookList) { activeBookList.Add(book); } return activeBookList; } public bool RemoveBook(string guid) { var book = BookList.FirstOrDefault(p => p.Uuid.Equals(guid)); if (book == null) return false; return BookList.Remove(book); } public bool AddBook(string name, string author) { var book = new Book(author, name); BookList.Add(book); return true; } } }