Beispiel #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();
        }
Beispiel #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();
        }
Beispiel #3
0
 public Cient(IClothesFactory factory)
 {
     _shirt    = factory.CreateShirt();
     _trousers = factory.CreateTrousers();
 }
 public AbstractFactoryDP(IClothesFactory factory)
 {
     _shirt    = factory.CreateShirt();
     _trousers = factory.CreateTrousers();
 }