Exemple #1
0
        public BlindTest(BlindTest other) : this()
        {
            if (other != null)
            {
                Id          = other.Id;
                Name        = other.Name;
                IsCompleted = other.IsCompleted;
                Created     = other.Created;
                Updated     = other.Updated;

                foreach (var item in other.CurrentVotes)
                {
                    CurrentVotes.Add(new CurrentVote(item));
                }

                foreach (var item in other._participants)
                {
                    _participants.Add(item.Key, new Participant(item.Value));
                }

                foreach (var item in other._completed_rounds)
                {
                    _completed_rounds.Add(item.Key, new VoteRound(item.Value));
                }

                _current_round = new VoteRound(other._current_round);
            }
        }
Exemple #2
0
 public BlindTest()
 {
     Name              = "";
     Created           = Updated = DateTime.Now;
     Rounds            = 0;
     IsRoundActive     = false;
     CurrentVotes      = new List <CurrentVote>();
     _participants     = new Dictionary <int, Participant>();
     _completed_rounds = new Dictionary <int, VoteRound>();
     _current_round    = new VoteRound();
 }
Exemple #3
0
 public VoteRound(VoteRound other) : this()
 {
     if (other != null)
     {
         foreach (var item in other._votes)
         {
             _votes.Add(item.Key, item.Value);
         }
         CurrentBrand = other.CurrentBrand;
         Completed    = other.Completed;
     }
 }