refactor out most of TransitionalFileLocator. Almost done with new stateful is-liberated paradigm

This commit is contained in:
Robert McRackan 2021-08-20 20:51:37 -04:00
parent a639857ec6
commit aa56bb74a1
13 changed files with 82 additions and 107 deletions

View file

@ -51,6 +51,25 @@ namespace DataLayer
// is owned, not optional 1:1
public UserDefinedItem UserDefinedItem { get; private set; }
// UserDefinedItem convenience properties
public bool Audio_Exists
{
get
{
var status = UserDefinedItem?.BookStatus;
// true since Error == libhack
return status.HasValue && status.Value != LiberatedStatus.NotLiberated;
}
}
public bool PDF_Exists
{
get
{
var status = UserDefinedItem?.PdfStatus;
return (status.HasValue && status.Value == LiberatedStatus.Liberated);
}
}
// is owned, not optional 1:1
/// <summary>The product's aggregate community rating</summary>
public Rating Rating { get; private set; } = new Rating(0, 0, 0);