Beispiel #1
0
        public ShippingProviderBase CreateShippingProvider(Order order)
        {
            ShippingProviderFactoryBase shippingProvider;

            if (order.Price > 100)
            {
                shippingProvider = new ShippingProviderFactoryGlobal();
            }
            else
            {
                shippingProvider = new ShippingProviderFactoryStandard();
            }

            return(shippingProvider.GetShippingProvider(order.Sender.Country));
        }
Beispiel #2
0
        public ShippingProviderBase CreateShippingProvider(Order order)
        {
            var shippingProvider = new ShippingProviderFactoryStandard();

            return(shippingProvider.GetShippingProvider(order.Sender.Country));
        }