public override void InitCacheManager() { var organizerEntityManager = new OrganizerEntityManager(); IocUnity.RegisterInstance <ICacheManager>(typeof(OrganizerEntityManager).Name, organizerEntityManager); DicCacheManagers.Add(typeof(OrganizerEntityManager).Name, (ICacheManager)organizerEntityManager); var leagueEntityManager = new LeagueEntityManager(); IocUnity.RegisterInstance <ICacheManager>(typeof(LeagueEntityManager).Name, leagueEntityManager); DicCacheManagers.Add(typeof(LeagueEntityManager).Name, (ICacheManager)leagueEntityManager); var matchEntityManager = new MatchEntityManager(); IocUnity.RegisterInstance <ICacheManager>(typeof(MatchEntityManager).Name, matchEntityManager); DicCacheManagers.Add(typeof(MatchEntityManager).Name, (ICacheManager)matchEntityManager); var playerEntityManager = new PlayerEntityManager(); IocUnity.RegisterInstance <ICacheManager>(typeof(PlayerEntityManager).Name, playerEntityManager); DicCacheManagers.Add(typeof(PlayerEntityManager).Name, (ICacheManager)playerEntityManager); var playerPenaltiesManager = new PlayerPenaltiesManager(); IocUnity.RegisterInstance <ICacheManager>(typeof(PlayerPenaltiesManager).Name, playerPenaltiesManager); DicCacheManagers.Add(typeof(PlayerPenaltiesManager).Name, (ICacheManager)playerPenaltiesManager); var PlayerStatisticsRecordManager = new PlayerStatisticsRecordManager(); IocUnity.RegisterInstance <ICacheManager>(typeof(PlayerStatisticsRecordManager).Name, PlayerStatisticsRecordManager); DicCacheManagers.Add(typeof(PlayerStatisticsRecordManager).Name, (ICacheManager)PlayerStatisticsRecordManager); var playerTimeRecordManager = new PlayerTimeRecordManager(); IocUnity.RegisterInstance <ICacheManager>(typeof(PlayerTimeRecordManager).Name, playerTimeRecordManager); DicCacheManagers.Add(typeof(PlayerTimeRecordManager).Name, (ICacheManager)playerTimeRecordManager); var seasonEntityManager = new SeasonEntityManager(); IocUnity.RegisterInstance <ICacheManager>(typeof(SeasonEntityManager).Name, seasonEntityManager); DicCacheManagers.Add(typeof(SeasonEntityManager).Name, (ICacheManager)seasonEntityManager); var seasonTypeInfoManager = new SeasonTypeInfoManager(); IocUnity.RegisterInstance <ICacheManager>(typeof(SeasonTypeInfoManager).Name, seasonTypeInfoManager); DicCacheManagers.Add(typeof(SeasonTypeInfoManager).Name, (ICacheManager)seasonTypeInfoManager); var seasonTableInfoManager = new SeasonTableInfoManager(); IocUnity.RegisterInstance <ICacheManager>(typeof(SeasonTableInfoManager).Name, seasonTableInfoManager); DicCacheManagers.Add(typeof(SeasonTableInfoManager).Name, (ICacheManager)seasonTableInfoManager); var seasonTeamsManager = new SeasonTeamsManager(); IocUnity.RegisterInstance <ICacheManager>(typeof(SeasonTeamsManager).Name, seasonTeamsManager); DicCacheManagers.Add(typeof(SeasonTeamsManager).Name, (ICacheManager)seasonTeamsManager); var teamEntityManager = new TeamEntityManager(); IocUnity.RegisterInstance <ICacheManager>(typeof(TeamEntityManager).Name, teamEntityManager); DicCacheManagers.Add(typeof(TeamEntityManager).Name, (ICacheManager)teamEntityManager); var teamPlayersManager = new TeamPlayersManager(); IocUnity.RegisterInstance <ICacheManager>(typeof(TeamPlayersManager).Name, teamPlayersManager); DicCacheManagers.Add(typeof(TeamPlayersManager).Name, (ICacheManager)teamPlayersManager); }
private void ProcessTableIdsTxt(BRBaseParam param, string txt) { var xml = new XmlHelper(txt); var cdataFlag = "//c"; var cdata = xml.GetValues(cdataFlag); // 解析SeasonType var root = GetHtmlRoot(cdata[1]); var ul = root.SelectSingleNode("//ul[@class='navtabs gismo']"); if (ul == null || ul.ChildNodes == null) { return; } List <string> list = new List <string>(); foreach (var li in ul.ChildNodes) { var seasonTypeId = RegexGetStr(li.OuterHtml, "seasontypeid','", "',"); var seasonTypeName = li.InnerText; if (!string.IsNullOrEmpty(seasonTypeId)) { var sti = SeasonTypeInfoManager.AddOrGetCacheEntity <SeasonTypeInfo>(param.SeasonId + "_" + seasonTypeId); sti.CompareSet(new SeasonTypeInfo() { SeasonId = param.SeasonId, SeasonType = seasonTypeId, Name = seasonTypeName }); list.Add(seasonTypeId); } } var se = SeasonEntityManager.AddOrGetCacheEntity <SeasonEntity>(param.SeasonId); var dic = se.CompareSetSeasonTypeList(list); // SeasonTypeAssignTask(param, dic); 除了type=21外的其他类型无需要的数据暂时不用请求处理 // 解析21类型即分组信息,并添加任务 var tableData = GetDataLikeKey(cdata, "template_cornerbox template_First"); if (string.IsNullOrEmpty(tableData)) { return; } root = GetHtmlRoot(tableData); var tableIdList = new List <string>(); var h2s = root.SelectNodes("//div[@class='multiview_wrap']/h2"); if (h2s == null) { return; } foreach (var h2 in h2s) { var tableId = RegexGetStr(h2.InnerHtml, "tableid','", "',"); tableIdList.Add(tableId); } var st = SeasonTypeInfoManager.AddOrGetCacheEntity <SeasonTypeInfo>(param.SeasonId + "_" + "21"); dic = st.CompareSetTabelIdList(tableIdList); SeasonTableAssignTask(param, dic); }