Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PeriodScore"/> class.
        /// </summary>
        /// <param name="dto">The data-transfer-object for period score</param>
        /// <param name="matchStatusesCache">The match statuses cache</param>
        public PeriodScore(PeriodScoreDTO dto, ILocalizedNamedValueCache matchStatusesCache)
        {
            Contract.Requires(dto != null);

            _homeScore          = dto.HomeScore;
            _awayScore          = dto.AwayScore;
            _type               = dto.Type;
            _number             = dto.PeriodNumber;
            _matchStatusCode    = dto.MatchStatusCode;
            _matchStatusesCache = matchStatusesCache;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PeriodScore"/> class.
        /// </summary>
        /// <param name="dto">The data-transfer-object for period score</param>
        /// <param name="matchStatusesCache">The match statuses cache</param>
        public PeriodScore(PeriodScoreDTO dto, ILocalizedNamedValueCache matchStatusesCache)
        {
            Guard.Argument(dto, nameof(dto)).NotNull();

            _homeScore          = dto.HomeScore;
            _awayScore          = dto.AwayScore;
            _type               = dto.Type;
            _number             = dto.PeriodNumber;
            _matchStatusCode    = dto.MatchStatusCode;
            _matchStatusesCache = matchStatusesCache;
        }