internal TimelineEvent(TimelineEventCI ci) { Contract.Requires(ci != null); Id = ci.Id; HomeScore = ci.HomeScore; AwayScore = ci.AwayScore; MatchTime = ci.MatchTime; Period = ci.Period; PeriodName = ci.PeriodName; Points = ci.Points; StoppageTime = ci.StoppageTime; Team = ci.Team; Type = ci.Type; Value = ci.Value; X = ci.X; Y = ci.Y; _x = ci.X ?? 0; _y = ci.Y ?? 0; Time = ci.Time; if (ci.Assists != null && ci.Assists.Any()) { Assists = ci.Assists.Select(s => new Assist(s.Id, s.Name, s.Type)); } if (ci.GoalScorer != null) { GoalScorer = new GoalScorer(ci.GoalScorer.Id, ci.GoalScorer.Name); } if (ci.Player != null) { Player = new Player(ci.Player.Id, ci.Player.Name); } MatchStatusCode = ci.MatchStatusCode; MatchClock = ci.MatchClock; }
internal TimelineEvent(TimelineEventCI ci) { Guard.Argument(ci, nameof(ci)).NotNull(); Id = ci.Id; HomeScore = ci.HomeScore; AwayScore = ci.AwayScore; MatchTime = ci.MatchTime; Period = ci.Period; PeriodName = ci.PeriodName; Points = ci.Points; StoppageTime = ci.StoppageTime; Team = ci.Team; Type = ci.Type; Value = ci.Value; X = ci.X; Y = ci.Y; _x = ci.X ?? 0; _y = ci.Y ?? 0; Time = ci.Time; if (ci.Assists != null && ci.Assists.Any()) { Assists = ci.Assists.Select(s => new Assist(s.Id, s.Name, s.Type)); } if (ci.GoalScorer != null) { GoalScorer = new GoalScorer(ci.GoalScorer); } if (ci.Player != null) { Player = new EventPlayer(ci.Player); } MatchStatusCode = ci.MatchStatusCode; MatchClock = ci.MatchClock; }