public void Initialize() { Logger.ShipItemCreateLogger.Init(); Logger.BasicInfoLogger.Init(); Logger.ShipDataLogger.Init(); Logger.SortieLogger.Init(); Logger.DrillLogger.Init(); PortObserver = new Observers.ApiPortObserver(); _disposables.AddLast(KanColleClient.Current.Proxy.api_port.TryParse <kcsapi_port>().Subscribe(PortObserver)); _disposables.AddLast(KanColleClient.Current.Proxy.api_get_member_ship2.TryParse <kcsapi_ship2[]>().Subscribe(new Observers.ApiShip2Observer())); BattleObserver = new Observers.ApiBattleObserver(); _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_req_sortie/battle").Subscribe(BattleObserver)); //昼战 _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_req_sortie/airbattle").Subscribe(BattleObserver)); //航空战 _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_req_battle_midnight/battle").Subscribe(BattleObserver)); //普通夜战 _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_req_battle_midnight/sp_midnight").Subscribe(BattleObserver)); //夜战点 _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_req_practice/battle").Subscribe(BattleObserver)); //演习 _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_req_practice/midnight_battle").Subscribe(BattleObserver)); //演习夜战 _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_req_combined_battle/battle").Subscribe(BattleObserver)); //联合机动舰队 _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_req_combined_battle/battle_water").Subscribe(BattleObserver)); //联合水打舰队 _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_req_combined_battle/airbattle").Subscribe(BattleObserver)); //联合舰队空战 _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_req_combined_battle/midnight_battle").Subscribe(BattleObserver)); //联合舰队夜战 MapStartNextObserver = new Observers.ApiMapStartNextObserver(); _disposables.AddLast(KanColleClient.Current.Proxy.api_req_map_start.Subscribe(MapStartNextObserver)); _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_req_map/next").Subscribe(MapStartNextObserver)); BattleResultObserver = new Observers.ApiBattleResultObserver(); _disposables.AddLast(KanColleClient.Current.Proxy.api_req_sortie_battleresult.TryParse <kcsapi_battleresult>().Subscribe(BattleResultObserver)); _disposables.AddLast(KanColleClient.Current.Proxy.api_req_combined_battle_battleresult.TryParse <kcsapi_combined_battle_battleresult>().Subscribe(BattleResultObserver)); _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_req_practice/battle_result").TryParse <kcsapi_battleresult>().Subscribe(BattleResultObserver)); PracticeEnemyInfoObserver = new Observers.ApiPracticeEnemyInfoObserver(); _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.Request.PathAndQuery == "/kcsapi/api_req_member/get_practice_enemyinfo").Subscribe(PracticeEnemyInfoObserver)); CreateShipObserver = new Observers.ApiCreateShipObserver(); _disposables.AddLast(KanColleClient.Current.Proxy.api_get_member_kdock.TryParse <kcsapi_kdock[]>().Subscribe(CreateShipObserver)); _disposables.AddLast(KanColleClient.Current.Proxy.api_req_kousyou_createship.TryParse <kcsapi_createship>().Subscribe(CreateShipObserver)); CreateItemObserver = new Observers.ApiCreateItemObserver(); _disposables.AddLast(KanColleClient.Current.Proxy.api_req_kousyou_createitem.TryParse <kcsapi_createitem>().Subscribe(CreateItemObserver)); Instance = this; if (_onInstanceCreate != null) { _onInstanceCreate(this); } }
public LynLoggerMain() { PortObserver = new Observers.ApiPortObserver(); _disposables.AddLast(KanColleClient.Current.Proxy.api_port.TryParse <kcsapi_port>().Subscribe(PortObserver)); _disposables.AddLast(KanColleClient.Current.Proxy.api_get_member_ship2.TryParse <kcsapi_ship2[]>().Subscribe(new Observers.ApiShip2Observer())); BattleObserver = new Observers.ApiBattleObserver(); _disposables.AddLast(KanColleClient.Current.Proxy.api_req_sortie_battle.Subscribe(BattleObserver)); //昼战 _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_sortie/airbattle").Subscribe(BattleObserver)); //航空战 _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_battle_midnight/battle").Subscribe(BattleObserver)); //普通夜战 _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_battle_midnight/sp_midnight").Subscribe(BattleObserver)); //夜战点 _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_practice/battle").Subscribe(BattleObserver)); //演习 _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_practice/midnight_battle").Subscribe(BattleObserver)); //演习夜战 MapStartNextObserver = new Observers.ApiMapStartNextObserver(); _disposables.AddLast(KanColleClient.Current.Proxy.api_req_map_start.Subscribe(MapStartNextObserver)); _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_map/next").Subscribe(MapStartNextObserver)); BattleResultObserver = new Observers.ApiBattleResultObserver(); _disposables.AddLast(KanColleClient.Current.Proxy.api_req_sortie_battleresult.TryParse <kcsapi_battleresult>().Subscribe(BattleResultObserver)); _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_practice/battle_result").TryParse <kcsapi_battleresult>().Subscribe(BattleResultObserver)); PracticeEnemyInfoObserver = new Observers.ApiPracticeEnemyInfoObserver(); _disposables.AddLast(KanColleClient.Current.Proxy.ApiSessionSource.Where(x => x.PathAndQuery == "/kcsapi/api_req_member/get_practice_enemyinfo").Subscribe(PracticeEnemyInfoObserver)); CreateShipObserver = new Observers.ApiCreateShipObserver(); _disposables.AddLast(KanColleClient.Current.Proxy.api_get_member_kdock.TryParse <kcsapi_kdock[]>().Subscribe(CreateShipObserver)); _disposables.AddLast(KanColleClient.Current.Proxy.api_req_kousyou_createship.TryParse <kcsapi_createship>().Subscribe(CreateShipObserver)); CreateItemObserver = new Observers.ApiCreateItemObserver(); _disposables.AddLast(KanColleClient.Current.Proxy.api_req_kousyou_createitem.TryParse <kcsapi_createitem>().Subscribe(CreateItemObserver)); Instance = this; if (_onInstanceCreate != null) { _onInstanceCreate(this); } }