//three constructors depending on original init private AnimeItemAbstraction(ILibraryData entry, int?id = null) { if (entry != null) { EntryData = entry; MyStartDate = entry.MyStartDate; MyEndDate = entry.MyEndDate; } if (ResourceLocator.AiringInfoProvider.TryGetAiringDay(Id, out DayOfWeek day)) { AirDay = (int)day + 1; } else { AirDay = -1; } if (!DataCache.TryRetrieveDataForId(id ?? Id, out VolatileDataCache data)) { return; } VolatileData = data; LoadedVolatile = true; }
//three constructors depending on original init private AnimeItemAbstraction(ILibraryData entry, int? id = null) { if (entry != null) { EntryData = entry; MyStartDate = entry.MyStartDate; MyEndDate = entry.MyEndDate; } VolatileDataCache data; if (!DataCache.TryRetrieveDataForId(id ?? Id, out data)) return; VolatileData = data; LoadedVolatile = true; }
//three constructors depending on original init private AnimeItemAbstraction(ILibraryData entry, int?id = null) { if (entry != null) { EntryData = entry; MyStartDate = entry.MyStartDate; MyEndDate = entry.MyEndDate; } if (!DataCache.TryRetrieveDataForId(id ?? Id, out VolatileDataCache data)) { return; } VolatileData = data; LoadedVolatile = true; }