Exemplo n.º 1
0
 private void GetWinnersFor(RaffleItem item)
 {
     int i = item.ItemCount - 1;
     while (i > 0 && heap.Count > 0) {
         var winner = heap.ExtractKey();
         Winners.Add(new Winner() {
             ItemId = item.ItemId,
             Item = item.Item,
             ParticipantId = winner.ParticipantId,
             Participant = winner.Participant,
             RaffleId = Raffle.RaffleId,
             Raffle = Raffle,
             RaffleCounter = Raffle.ExecutionCount,
             Claimed = false
         });
         --i;
     }
 }
Exemplo n.º 2
0
 public RaffleItemModel(RaffleItem entity)
 {
 }