コード例 #1
0
        private void CreateNextShelf(List <IShelf> shelves, Product product)
        {
            IShelf shelf = factory.CreateShelf(shelvesTransform, product.category);

            shelf.Init(product.category);

            shelves.Add(shelf);

            AddProduct(shelf, product);
        }
コード例 #2
0
        private void CreateShelf(Product product)
        {
            IShelf shelf = factory.CreateShelf(shelvesTransform, product.category, true);

            shelf.Init(product.category);

            Shelves.Add(product.category, new List <IShelf>()
            {
                shelf
            });

            AddProduct(shelf, product);
        }