예제 #1
0
        public static SummaryDatabase GenerateSummaryDatabase(Old_RaidCollection _RaidCollection, Func <string, Old_FightDataCollection> _CachedGetFightDataCollectionFunc, Func <WowRealm, VF_RaidDamageDatabase.RealmDB> _GetRealmDB)
        {
            SummaryDatabase newDatabase = new SummaryDatabase();

            newDatabase.UpdateDatabase(_RaidCollection, _CachedGetFightDataCollectionFunc, _GetRealmDB);
            return(newDatabase);
        }
예제 #2
0
        public static SummaryDatabase UpdateSummaryDatabase_New(string _SummaryDatabaseFile, Old_RaidCollection _FullRaidCollection, List <Old_RaidCollection_Raid> _RecentChangedRaids, Func <string, Old_FightDataCollection> _CachedGetFightDataCollectionFunc, Func <WowRealm, VF_RaidDamageDatabase.RealmDB> _GetRealmDB)
        {
            SummaryDatabase database = null;

            if (System.IO.File.Exists(_SummaryDatabaseFile) == true)
            {
                if (VF.Utility.LoadSerialize(_SummaryDatabaseFile, out database, 100000, true) == false)
                {
                    database = null;
                }
            }
            if (database == null)
            {
                database = GenerateSummaryDatabase(_FullRaidCollection, _CachedGetFightDataCollectionFunc, _GetRealmDB);
            }
            else
            {
                database.UpdateDatabase(_RecentChangedRaids, _CachedGetFightDataCollectionFunc, _GetRealmDB);
            }
            VF.Utility.SaveSerialize(_SummaryDatabaseFile, database);
            return(database);
        }