// Spludlow Software // Copyright © Samuel P. Ludlow 2020 All Rights Reserved // Distributed under the terms of the GNU General Public License version 3 // Distributed WITHOUT ANY WARRANTY; without implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE // https://www.spludlow.co.uk/LICENCE.TXT // The Spludlow logo is a registered trademark of Samuel P. Ludlow and may not be used without permission // v1.14 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Spludlow.Mame { public class MameHashStores { private MameChdMan _ChdMan; private MameConfiguration _Config; public MameHashStores() { _ChdMan = new MameChdMan(); _Config = new MameConfiguration(); } private HashStore _MachineRom = null; private HashStore _MachineDisk = null; private HashStore _SoftwareRom = null; private HashStore _SoftwareDisk = null; public HashStore MachineRom { get { if (_MachineRom == null) _MachineRom = new HashStore(_Config.StoreDirectoryMachineRom); return _MachineRom; } } public HashStore MachineDisk { get { if (_MachineDisk == null) _MachineDisk = new HashStore(_Config.StoreDirectoryMachineDisk, _ChdMan.Hash); return _MachineDisk; } } public HashStore SoftwareRom { get { if (_SoftwareRom == null) _SoftwareRom = new HashStore(_Config.StoreDirectorySoftwareRom); return _SoftwareRom; } } public HashStore SoftwareDisk { get { if (_SoftwareDisk == null) _SoftwareDisk = new HashStore(_Config.StoreDirectorySoftwareDisk, _ChdMan.Hash); return _SoftwareDisk; } } } }