Пример #1
0
        private static void ShowWhatAmIWearingToday(IClothesFactory factory)
        {
            Console.WriteLine("Here's what I'm wearing today:");

            var shirt = factory.CreateShirt();
            shirt.DescribeShirt();

            var pants = factory.CreatePants();
            pants.DescribePants();
        }
Пример #2
0
        private static void ShowWhatAmIWearingToday(IClothesFactory factory)
        {
            Console.WriteLine("Here's what I'm wearing today:");

            var shirt = factory.CreateShirt();

            shirt.DescribeShirt();

            var pants = factory.CreatePants();

            pants.DescribePants();
        }
Пример #3
0
 public Cient(IClothesFactory factory)
 {
     _shirt    = factory.CreateShirt();
     _trousers = factory.CreateTrousers();
 }
Пример #4
0
 public AbstractFactoryDP(IClothesFactory factory)
 {
     _shirt    = factory.CreateShirt();
     _trousers = factory.CreateTrousers();
 }