Пример #1
0
        public void ManufactureSet(IAbstractFactory factory)
        {
            IAbstractProductA productA = factory.CreateProductA();
            IAbstractProductB productB = factory.CreateProductB();

            Debug.WriteLine("Created: " + productA.SomeFunction() + ", " + productB.SomeFunction());
            Debug.WriteLine("Tested: " + productB.AnotherFunction(productA));
        }
Пример #2
0
 public string AnotherFunction(IAbstractProductA collaborator)
 {
     return("ConcreteProductB1 collaborates with " + collaborator.SomeFunction());
 }