コード例 #1
0
        //public Box WarpBox(Func<Product> getProduct)
        //{
        //    Product productX = getProduct();
        //    Box boxX = new Box();
        //    boxX.BoxProduct = productX;
        //    return boxX;
        //}
        public Box WarpBox(Iproduct productFactory)
        {
            Box box1 = new Box();

            box1.BoxProduct = productFactory.Make();
            return(box1);
        }