public AllStoreInventories(Context context, IList <byte> bytes, IList <byte> defaultBytes) { if (defaultBytes != null) { Default = new AllStoreInventories(context, defaultBytes); } ourContext = context; List <StoreInventory> stores = new List <StoreInventory>(shops.Length); Dictionary <Shops, StoreInventory> storesDict = new Dictionary <Shops, StoreInventory>(shops.Length); foreach (Shops s in shops) { StoreInventory si = null; if (defaultBytes != null) { si = new StoreInventory(context, s, bytes, defaultBytes); } else { si = new StoreInventory(context, s, bytes); } si.DataChanged += OnDataChanged; stores.Add(si); storesDict.Add(s, si); } Stores = stores.AsReadOnly(); StoresDict = new ReadOnlyDictionary <Shops, StoreInventory>(storesDict, false); }
public StoreInventory(Context context, Shops whichStore, IList <byte> bytes, IList <byte> defaultBytes) : this(context, whichStore, bytes) { Default = new StoreInventory(context, whichStore, defaultBytes); }
public StoreInventory( Context context, Shops whichStore, IList<byte> bytes, IList<byte> defaultBytes ) : this( context, whichStore, bytes ) { Default = new StoreInventory( context, whichStore, defaultBytes ); }
public AllStoreInventories( Context context, IList<byte> bytes, IList<byte> defaultBytes ) { if (defaultBytes != null) { Default = new AllStoreInventories( context, defaultBytes ); } ourContext = context; List<StoreInventory> stores = new List<StoreInventory>( shops.Length ); Dictionary<Shops, StoreInventory> storesDict = new Dictionary<Shops, StoreInventory>( shops.Length ); foreach ( Shops s in shops ) { StoreInventory si = null; if ( defaultBytes != null ) { si = new StoreInventory( context, s, bytes, defaultBytes ); } else { si = new StoreInventory( context, s, bytes ); } si.DataChanged += OnDataChanged; stores.Add( si ); storesDict.Add( s, si ); } Stores = stores.AsReadOnly(); StoresDict = new ReadOnlyDictionary<Shops, StoreInventory>( storesDict, false ); }