public GiveawayRepo(IDataStorage storage) { _storage = storage; // Load items for (int i = 0; i < Enum.GetValues(typeof(GiveawayItemType)).Length; i++) { GiveawayItemType type = (GiveawayItemType)i; GiveawayItems.Add(storage.RestoreObject <GiveawayItems>($"Giveaway/Giveaway{type.ToString()}s")); } }
public GiveawayItems(GiveawayItemType itemTypes, GiveawayItem[] items) { ItemTypes = itemTypes; Items = items.ToList(); }