Ejemplo n.º 1
0
        public IPaymentService Create(ServicesAvailable operation)
        {
            IPaymentService result;

            if (operation == ServicesAvailable.Italian)
            {
                result = new ItalianPaymentService();
            }
            else
            {
                result = new BrazilianPaymentService();
            }
            return(result);
        }
Ejemplo n.º 2
0
        public IFactoryProduct Factory(Enum operation)
        {
            IFactoryProduct result;

            if ((ServicesAvailable)operation == ServicesAvailable.Italian)
            {
                result = new ItalianPaymentService();
            }
            else
            {
                result = new BrazilianPaymentService();
            }
            return(result);
        }