public VF_RDDatabase.SummaryDatabase GetSummaryDatabase() { return(DynamicReloader.GetData <VF_RDDatabase.SummaryDatabase>(() => { VF_RDDatabase.SummaryDatabase summaryDB = null; summaryDB = VF_RDDatabase.SummaryDatabase.LoadSummaryDatabase(g_RDDBDir); summaryDB.GeneratePlayerSummaries(); return summaryDB; }, (_RaidCollection, _LastLoadTime) => { return (DateTime.UtcNow - _LastLoadTime).TotalMinutes > 10; })); }
public VF_RDDatabase.SummaryDatabase GetSummaryDatabase() { return(DynamicReloader.GetData <VF_RDDatabase.SummaryDatabase>(() => { VF_RDDatabase.SummaryDatabase summaryDB = null; summaryDB = VF_RDDatabase.SummaryDatabase.LoadSummaryDatabase(g_RDDBDir); summaryDB.GeneratePlayerSummaries(); GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced); return summaryDB; }, (_SummaryDatabase, _LastLoadTime) => { return (DateTime.UtcNow - _LastLoadTime).TotalMinutes > 30; })); }
public VF_RDDatabase.SummaryDatabase GetSummaryDatabase() { return(DynamicReloader.GetData <VF_RDDatabase.SummaryDatabase>(() => { Logger.ConsoleWriteLine("Inside GetSummaryDatabase->GetData()"); try { if (m_FullSummaryDatabase == null) { m_FullSummaryDatabase = VF_RDDatabase.SummaryDatabase.LoadSummaryDatabase_New(g_RDDBDir + "\\SummaryDatabase\\BaseSummaryDatabase.dat"); if (m_FullSummaryDatabase != null) { m_FullSummaryDatabase.AddSummaryDatabase(g_RDDBDir + "\\SummaryDatabase\\VeryOldSummaryDatabase.dat"); m_FullSummaryDatabase.AddSummaryDatabase(g_RDDBDir + "\\SummaryDatabase\\OldSummaryDatabase.dat"); m_FullSummaryDatabase.GeneratePlayerSummaries(true); //TODO: Add code to load all summarydatabases from a specific history directory } } if (m_FullSummaryDatabase != null) { if (m_FullSummaryDatabase.AddSummaryDatabase(g_RDDBDir + "\\SummaryDatabase\\NewSummaryDatabase.dat") == true) { m_FullSummaryDatabase.GeneratePlayerSummaries(true); } } else { m_FullSummaryDatabase = VF_RDDatabase.SummaryDatabase.LoadSummaryDatabase_New(g_RDDBDir + "\\SummaryDatabase\\NewSummaryDatabase.dat"); m_FullSummaryDatabase.GeneratePlayerSummaries(); } } catch (Exception ex) { Logger.LogException(ex); } Logger.ConsoleWriteLine("Done GetSummaryDatabase->GetData()"); GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced); return m_FullSummaryDatabase; }, (_SummaryDatabase, _LastLoadTime) => { return (DateTime.UtcNow - _LastLoadTime).TotalMinutes > 30; })); }