Exemple #1
0
        static void Main(string[] args)
        {
            var customer = new Customer();

            // cannot access RateCalculator because Its in another assembly as internal
            Amazon.RateCalculator calculator = new RateCalculator();
        }
Exemple #2
0
        public void Promote()
        {
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);

            Console.WriteLine("Promote logic changed.");
        }
Exemple #3
0
        static void Main(string[] args)
        {
            var customer = new Customer();

            Amazon.RateCalculator calculator = new RateCalculator();
            // Console.WriteLine("Hello World!");
        }
        static void Main(string[] args)
        {
            var customer = new Customer();

            // -- bad -- Amazon dependancy
            // internal, cannot view in this assembly
            Amazon.RateCalculator calculator = new RateCalculator();
        }
        static void Main(string[] args)
        {
            var person = new Person();

            var customer = new Customer();

            var            user           = new User();
            RateCalculator rateCalculator = new RateCalculator();
        }
Exemple #6
0
        static void Main(string[] args)
        {
            var person = new Person();

            person.SetBirthdate(new DateTime(1980, 3, 31));
            Console.WriteLine(person.GetBirthdate());

            var customer = new Customer();

            Amazon.RateCalculator calulator = new RateCalculator();
        }
Exemple #7
0
        public void Promote()
        {
            // var rating = CalculateRating(excludeOrders: true);
            // if (rating ==0)
            //     System.Console.WriteLine("Promoted to level 1");
            // else
            //     System.Console.WriteLine("Promoted to level 2");
            var calculator = new RateCalculator();
            var rating     = calculator.Calculate(this);


            System.Console.WriteLine("Promote logic changed.");
        }
Exemple #8
0
        public static void Main(string[] args)
        {
            var customer = new Customer();

            Amazon.RateCalculator calculator = new RateCalculator();
        }