Esempio n. 1
0
        /// <summary>
        /// Creates a book set containing books in verses
        /// </summary>
        public static BookSet CreateBookSetFromRefs(IEnumerable <VerseRef> verseRefs)
        {
            BookSet books = new BookSet();

            foreach (var verseRef in verseRefs)
            {
                books.Add(verseRef.BookNum);
            }

            return(books);
        }
Esempio n. 2
0
        /// <summary>
        /// Intersects two book sets
        /// </summary>
        /// <param name="other"></param>
        /// <returns>books that are present in both</returns>
        public BookSet Intersect(BookSet other)
        {
            BookSet bookSet = new BookSet();

            foreach (int bookNum in other.SelectedBookNumbers)
            {
                if (IsSelected(bookNum))
                {
                    bookSet.Add(bookNum);
                }
            }
            return(bookSet);
        }