internal BattleDetailRecords(SQLiteConnection rpConnection, int rpUserID) : base(rpConnection)
{
r_Filename = new FileInfo(Path.Combine(RecordService.Instance.RecordDirectory.FullName, rpUserID + "_Battle.db")).FullName;
r_Connection = new SQLiteConnection($@"Data Source={r_Filename}; Page Size=8192").OpenAndReturn();
using (var rCommand = r_Connection.CreateCommand())
{
rCommand.CommandText =
"PRAGMA journal_mode = DELETE; " +
"PRAGMA foreign_keys = ON;";
rCommand.ExecuteNonQuery();
}
var rSortieFirstStageApis = new[]
{
"api_req_sortie/battle",
"api_req_battle_midnight/sp_midnight",
"api_req_sortie/airbattle",
"api_req_sortie/ld_airbattle",
"api_req_combined_battle/airbattle",
"api_req_combined_battle/battle",
"api_req_combined_battle/battle_water",
"api_req_combined_battle/sp_midnight",
"api_req_combined_battle/ld_airbattle",
"api_req_combined_battle/ec_battle",
"api_req_combined_battle/each_battle",
"api_req_combined_battle/each_battle_water",
};
DisposableObjects.Add(ApiService.Subscribe(rSortieFirstStageApis, ProcessSortieFirstStage));
DisposableObjects.Add(ApiService.Subscribe("api_req_practice/battle", ProcessPracticeFirstStage));
var rSecondStageApis = new[]
{
"api_req_practice/midnight_battle",
"api_req_battle_midnight/battle",
"api_req_combined_battle/midnight_battle",
"api_req_combined_battle/ec_midnight_battle",
"api_req_practice/midnight_battle",
};
DisposableObjects.Add(ApiService.Subscribe(rSecondStageApis, ProcessSecondStage));
var rBattleResultApis = new[]
{
"api_req_sortie/battleresult",
"api_req_combined_battle/battleresult",
"api_req_practice/battle_result",
};
DisposableObjects.Add(ApiService.Subscribe(rBattleResultApis, ProcessResult));
}