예제 #1
0
        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"));
            }
        }
예제 #2
0
 public GiveawayItems(GiveawayItemType itemTypes, GiveawayItem[] items)
 {
     ItemTypes = itemTypes;
     Items     = items.ToList();
 }