/// <summary> /// Initializes a new instance of the <see cref="Round"/> class /// </summary> /// <param name="ci">A <see cref="RoundCI"/> used to create new instance</param> /// <param name="cultures">A cultures of the current instance of <see cref="RoundCI"/></param> public Round(RoundCI ci, IEnumerable <CultureInfo> cultures) { Contract.Requires(ci != null); Type = ci.Type; Number = ci.Number; GroupName = ci.Group; GroupId = ci.GroupId; OtherMatchId = ci.OtherMatchId; CupRoundMatches = ci.CupRoundMatches; CupRoundMatchNumber = ci.CupRoundMatchNumber; Name = new Dictionary <CultureInfo, string>(); PhaseOrGroupLongName = new Dictionary <CultureInfo, string>(); foreach (var c in cultures) { Name.Add(c, ci.GetName(c)); PhaseOrGroupLongName.Add(c, ci.GetPhaseOrGroupLongName(c)); } BetradarId = ci.BetradarId ?? 0; Phase = ci.Phase; }
/// <summary> /// Initializes a new instance of the <see cref="Round"/> class /// </summary> /// <param name="ci">A <see cref="RoundCI"/> used to create new instance</param> /// <param name="cultures">A cultures of the current instance of <see cref="RoundCI"/></param> public Round(RoundCI ci, IEnumerable <CultureInfo> cultures) { Guard.Argument(ci, nameof(ci)).NotNull(); Type = ci.Type; Number = ci.Number; GroupName = ci.Group; GroupId = ci.GroupId; OtherMatchId = ci.OtherMatchId; CupRoundMatches = ci.CupRoundMatches; CupRoundMatchNumber = ci.CupRoundMatchNumber; Name = new Dictionary <CultureInfo, string>(); PhaseOrGroupLongName = new Dictionary <CultureInfo, string>(); foreach (var c in cultures) { Name.Add(c, ci.GetName(c)); PhaseOrGroupLongName.Add(c, ci.GetPhaseOrGroupLongName(c)); } BetradarId = ci.BetradarId ?? 0; Phase = ci.Phase; }