示例#1
0
 public TBookList(TBookList books) : this()
 {
     if (books == null)
     {
         return;
     }
     lock ( _LockItems ) {
         Items = new List <TBook>(books);
     }
 }
示例#2
0
        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);
                    }
                }
            }
        }