reduce use of Book.Supplements
This commit is contained in:
parent
f19c46ee45
commit
d7eb190f69
3 changed files with 15 additions and 15 deletions
|
|
@ -186,7 +186,7 @@ namespace ApplicationServices
|
|||
: LiberatedStatus.NotLiberated;
|
||||
|
||||
public static LiberatedStatus? Pdf_Status(Book book)
|
||||
=> !book.Supplements.Any() ? null
|
||||
=> !book.HasPdf ? null
|
||||
: book.PDF_Exists ? LiberatedStatus.Liberated
|
||||
: LiberatedStatus.NotLiberated;
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ namespace ApplicationServices
|
|||
|
||||
var boolResults = libraryBooks
|
||||
.AsParallel()
|
||||
.Where(lb => lb.Book.Supplements.Any())
|
||||
.Where(lb => lb.Book.HasPdf)
|
||||
.Select(lb => Pdf_Status(lb.Book))
|
||||
.ToList();
|
||||
var pdfsDownloaded = boolResults.Count(r => r == LiberatedStatus.Liberated);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue