public void ClientMethod(IAbstractFactory factory) { IAbstractProductProcessor productA = factory.CreateProductProcessor(); IAbstractProductMotherboard productB = factory.CreateProductMotherboard(); Console.WriteLine(productB.UsefulFunctionMotherboard()); Console.WriteLine(productB.AnotherUsefulFunctionMotherboard(productA)); }
public string AnotherUsefulFunctionMotherboard(IAbstractProductProcessor collaborator) { var result = collaborator.UsefulFunctionProcessor(); return($"The result of the product Sony Motherboard collaborating with the ({result})"); }