/// <summary> /// Merges the specified fixture /// </summary> /// <param name="timelineDTO">The match timeline</param> /// <param name="culture">The culture</param> private void ActualMergeTimeline(MatchTimelineDTO timelineDTO, CultureInfo culture) { if (_eventTimeline == null) { _eventTimeline = new EventTimelineCI(timelineDTO, culture); } else { _eventTimeline.Merge(timelineDTO, culture); } }
/// <summary> /// Initializes a new instance of the <see cref="MatchCI"/> class /// </summary> /// <param name="exportable">A <see cref="ExportableMatchCI" /> specifying the current instance</param> /// <param name="dataRouterManager">The <see cref="IDataRouterManager"/> used to obtain summary and fixture</param> /// <param name="semaphorePool">A <see cref="ISemaphorePool" /> instance used to obtain sync objects</param> /// <param name="defaultCulture">A <see cref="CultureInfo" /> specifying the language used when fetching info which is not translatable (e.g. Scheduled, ..)</param> /// <param name="fixtureTimestampCache">A <see cref="MemoryCache"/> used to cache the sport events fixture timestamps</param> public MatchCI(ExportableMatchCI exportable, IDataRouterManager dataRouterManager, ISemaphorePool semaphorePool, CultureInfo defaultCulture, MemoryCache fixtureTimestampCache) : base(exportable, dataRouterManager, semaphorePool, defaultCulture, fixtureTimestampCache) { _season = exportable.Season != null ? new CacheItem(exportable.Season) : null; _tournamentRound = exportable.TournamentRound != null ? new RoundCI(exportable.TournamentRound) : null; _tournamentId = exportable.TournamentId != null ? URN.Parse(exportable.TournamentId) : null; _fixture = exportable.Fixture != null ? new Fixture(exportable.Fixture) : null; _eventTimeline = exportable.EventTimeline != null ? new EventTimelineCI(exportable.EventTimeline) : null; _delayedInfo = exportable.DelayedInfo != null ? new DelayedInfoCI(exportable.DelayedInfo) : null; }
/// <summary> /// Merges the specified fixture /// </summary> /// <param name="timelineDTO">The match timeline</param> /// <param name="culture">The culture</param> private void ActualMergeTimeline(MatchTimelineDTO timelineDTO, CultureInfo culture) { if (_eventTimeline == null) { _eventTimeline = new EventTimelineCI(timelineDTO, culture); } else { _eventTimeline.Merge(timelineDTO, culture); } if (timelineDTO.CoverageInfo != null) { _coverageInfo = new CoverageInfoCI(timelineDTO.CoverageInfo); } }
public EventTimeline(EventTimelineCI ci) { Guard.Argument(ci, nameof(ci)).NotNull(); TimelineEvents = ci.Timeline?.Select(s => new TimelineEvent(s)); }
public EventTimeline(EventTimelineCI ci) { Contract.Requires(ci != null); TimelineEvents = ci.Timeline?.Select(s => new TimelineEvent(s)); }