예제 #1
0
        public void ClientMethod(IAbstractFactory factory)
        {
            IAbstractProductAccumulator productA = factory.CreateProductAccumulator();
            IAbstractProductDisplay     productB = factory.CreateProductDisplay();

            Console.WriteLine(productB.UsefulFunctionDisplay());
            Console.WriteLine(productB.AnotherUsefulFunctionDisplay(productA));
        }
예제 #2
0
        public string AnotherUsefulFunctionDisplay(IAbstractProductAccumulator collaborator)
        {
            var result = collaborator.UsefulFunctionAccumulator();

            return($"The result of the Samsung Display collaborating with the ({result})");
        }