public TBookList(TBookList books) : this() { if (books == null) { return; } lock ( _LockItems ) { Items = new List <TBook>(books); } }
public IEnumerable <TBook> GetMissingFrom(TBookList bookList) { lock ( _LockItems ) { if (bookList == null) { yield break; } foreach (TBook BookItem in bookList) { if (Items.FirstOrDefault(x => x.CollectionName.ToLower() == BookItem.CollectionName.ToLower() && x.Number.ToLower() == BookItem.Number.ToLower() && x.Name.ToLower() == BookItem.Name.ToLower()) == null) { yield return(BookItem); } } } }