using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Catamaran { internal class CatamaransGenericStorage { readonly Dictionary> _catStorages; public List Keys => _catStorages.Keys.ToList(); private readonly int _pictureWidth; private readonly int _pictureHeight; public CatamaransGenericStorage(int pictureWidth, int pictureHeight) { _catStorages = new Dictionary>(); _pictureWidth = pictureWidth; _pictureHeight = pictureHeight; } public void AddSet(string name) { _catStorages.Add(name, new CatamaransGenericCollection(_pictureWidth, _pictureHeight)); } public void DelSet(string name) { if (!_catStorages.ContainsKey(name)) return; _catStorages.Remove(name); } public CatamaransGenericCollection? this[string ind] { get { if (_catStorages.ContainsKey(ind)) return _catStorages[ind]; return null; } } } }