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)); }
public string AnotherFunction(IAbstractProductA collaborator) { return("ConcreteProductB1 collaborates with " + collaborator.SomeFunction()); }