Esempio n. 1
0
        public void ClientMethod(IAbstractFactory factory)
        {
            IAbstractProductProcessor   productA = factory.CreateProductProcessor();
            IAbstractProductMotherboard productB = factory.CreateProductMotherboard();

            Console.WriteLine(productB.UsefulFunctionMotherboard());
            Console.WriteLine(productB.AnotherUsefulFunctionMotherboard(productA));
        }
Esempio n. 2
0
        public string AnotherUsefulFunctionMotherboard(IAbstractProductProcessor collaborator)
        {
            var result = collaborator.UsefulFunctionProcessor();

            return($"The result of the product Sony Motherboard collaborating with the ({result})");
        }