/// <summary> /// コンストラクタ /// </summary> /// <param name="conn">DB接続情報</param> /// <param name="wareProductionManager">ウェア生産情報一覧</param> /// <param name="transportTypeManager">カーゴ種別一覧</param> public ModuleBuilder( IDbConnection conn, WareProductionManager wareProductionManager, TransportTypeManager transportTypeManager, WareEquipmentManager wareEquipmentManager ) { // モジュール種別一覧を作成 { const string sql = "SELECT ModuleTypeID, Name FROM ModuleType"; _ModuleTypes = conn.Query <ModuleType>(sql) .ToDictionary(x => x.ModuleTypeID, x => x as IModuleType); } // モジュール情報一覧を作成 _Modules = conn.Query <X4_DataExporterWPF.Entity.Module>("SELECT * FROM Module") .ToDictionary(x => x.ModuleID); _ModuleProductManager = new(conn, wareProductionManager); _StorageManager = new(conn, transportTypeManager); _WareEquipmentManager = wareEquipmentManager; }
/// <summary> /// コンストラクタ /// </summary> /// <param name="conn">DB接続情報</param> public WareBuilder(IDbConnection conn, TransportTypeManager transportTypeManager) { _Conn = conn; _TransportTypeManager = transportTypeManager; _WareTagsManager = new(conn); _WareOwnerManager = new(conn); _WareResourceManager = new(conn); _WareProductionManager = new(conn); _WareGroupManager = new(conn); _WareEffectManager = new(conn); var wareEquipmentManager = new WareEquipmentManager(conn); _ShipBuilder = new(conn, wareEquipmentManager); _ModuleBuilder = new(conn, _WareProductionManager, transportTypeManager, wareEquipmentManager); _EquipmentBuilder = new(conn); }
/// <summary> /// コンストラクタ /// </summary> /// <param name="conn">DB接続情報</param> /// <param name="wareEquipmentManager">ウェアの装備情報一覧</param> public ShipBuilder(IDbConnection conn, WareEquipmentManager wareEquipmentManager) { _ShipHangerManager = new(conn); _ShipLoadoutManager = new(conn); _WareEquipmentManager = wareEquipmentManager; // 艦船種別を初期化 { const string sql = @"SELECT ShipTypeID, Name, Description FROM ShipType"; _ShipTypes = conn.Query <ShipType>(sql) .ToDictionary(x => x.ShipTypeID, x => x as IShipType); } // 艦船情報一覧を作成 { _Ships = conn.Query <X4_DataExporterWPF.Entity.Ship>("SELECT * FROM Ship") .ToDictionary(x => x.ShipID); } }