public RoyalePublisherGameViewModel(RoyalePublisherGame domain, IClock clock)
 {
     PublisherID      = domain.PublisherID;
     YearQuarter      = new RoyaleYearQuarterViewModel(domain.YearQuarter);
     MasterGame       = new MasterGameYearViewModel(domain.MasterGame, clock);
     Locked           = domain.IsLocked(clock);
     Timestamp        = domain.Timestamp;
     AmountSpent      = domain.AmountSpent;
     AdvertisingMoney = domain.AdvertisingMoney;
     FantasyPoints    = domain.FantasyPoints;
 }
Пример #2
0
 public RoyalePublisherGameViewModel(RoyalePublisherGame domain, LocalDate currentDate, IEnumerable <MasterGameTag> allMasterGameTags)
 {
     PublisherID         = domain.PublisherID;
     YearQuarter         = new RoyaleYearQuarterViewModel(domain.YearQuarter);
     MasterGame          = new MasterGameYearViewModel(domain.MasterGame, currentDate);
     Locked              = domain.IsLocked(currentDate, allMasterGameTags);
     Timestamp           = domain.Timestamp;
     AmountSpent         = domain.AmountSpent;
     AdvertisingMoney    = domain.AdvertisingMoney;
     FantasyPoints       = domain.FantasyPoints;
     CurrentlyIneligible = domain.CalculateIsCurrentlyIneligible(allMasterGameTags);
     RefundAmount        = AmountSpent;
     if (!CurrentlyIneligible)
     {
         RefundAmount /= 2;
     }
 }