Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StageCI"/> class
 /// </summary>
 /// <param name="exportable">The exportable cache item</param>
 /// <param name="dataRouterManager">The <see cref="IDataRouterManager"/> used to obtain summary and fixture</param>
 /// <param name="semaphorePool">The semaphore pool</param>
 /// <param name="defaultCulture">The default culture</param>
 /// <param name="fixtureTimestampCache">A <see cref="ObjectCache"/> used to cache the sport events fixture timestamps</param>
 public StageCI(ExportableStageCI exportable,
                IDataRouterManager dataRouterManager,
                ISemaphorePool semaphorePool,
                CultureInfo defaultCulture,
                ObjectCache fixtureTimestampCache)
     : base(exportable, dataRouterManager, semaphorePool, defaultCulture, fixtureTimestampCache)
 {
     _categoryId  = URN.Parse(exportable.CategoryId);
     _parentStage = exportable.ParentStage != null ? new StageCI(exportable.ParentStage, dataRouterManager, semaphorePool, defaultCulture, fixtureTimestampCache) : null;
     _childStages = exportable.ChildStages?.Select(s => new StageCI(s, dataRouterManager, semaphorePool, defaultCulture, fixtureTimestampCache));
     _stageType   = exportable.StageType;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StageCI"/> class
 /// </summary>
 /// <param name="exportable">The exportable cache item</param>
 /// <param name="dataRouterManager">The <see cref="IDataRouterManager"/> used to obtain summary and fixtureDTO</param>
 /// <param name="semaphorePool">The semaphore pool</param>
 /// <param name="defaultCulture">The default culture</param>
 /// <param name="fixtureTimestampCache">A <see cref="MemoryCache"/> used to cache the sport events fixtureDTO timestamps</param>
 public StageCI(ExportableStageCI exportable,
                IDataRouterManager dataRouterManager,
                ISemaphorePool semaphorePool,
                CultureInfo defaultCulture,
                MemoryCache fixtureTimestampCache)
     : base(exportable, dataRouterManager, semaphorePool, defaultCulture, fixtureTimestampCache)
 {
     _categoryId          = URN.Parse(exportable.CategoryId);
     _parentStageId       = exportable.ParentStageId;
     _childStages         = exportable.ChildStages?.Select(s => new StageCI(s, dataRouterManager, semaphorePool, defaultCulture, fixtureTimestampCache));
     _additionalParentIds = exportable.AdditionalParentIds;
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StageCI"/> class
 /// </summary>
 /// <param name="exportable">The exportable cache item</param>
 /// <param name="dataRouterManager">The <see cref="IDataRouterManager"/> used to obtain summary and fixtureDTO</param>
 /// <param name="semaphorePool">The semaphore pool</param>
 /// <param name="defaultCulture">The default culture</param>
 /// <param name="fixtureTimestampCache">A <see cref="MemoryCache"/> used to cache the sport events fixtureDTO timestamps</param>
 public StageCI(ExportableStageCI exportable,
                IDataRouterManager dataRouterManager,
                ISemaphorePool semaphorePool,
                CultureInfo defaultCulture,
                MemoryCache fixtureTimestampCache)
     : base(exportable, dataRouterManager, semaphorePool, defaultCulture, fixtureTimestampCache)
 {
     _categoryId          = string.IsNullOrEmpty(exportable.CategoryId) ? null : URN.Parse(exportable.CategoryId);
     _parentStageId       = string.IsNullOrEmpty(exportable.ParentStageId) ? null : URN.Parse(exportable.ParentStageId);
     _childStages         = exportable.ChildStages?.Select(s => new StageCI(s, dataRouterManager, semaphorePool, defaultCulture, fixtureTimestampCache));
     _additionalParentIds = exportable.AdditionalParentIds.IsNullOrEmpty() ? null : exportable.AdditionalParentIds.Select(URN.Parse).ToList();
 }