Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            // just like service layer in web application
            //sample 1
            CalculationFacade facade = new CalculationFacade();

            Console.WriteLine(facade.Calculate(20));


            Console.ReadKey();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            // Instead of using the subsystem which is rich on functions
            // the client uses the facade which simplifies the usage
            CalculationFacade easyToUseInterface = new CalculationFacade();
            int a      = 4;
            int b      = 2;
            int result = easyToUseInterface.DoComplexCalculation(a, b);

            Console.ReadLine();
        }