RefactoringSample.Statement.Statement C# (CSharp) Method

Statement() public method

public Statement ( Customer customer ) : System.Collections.Generic
customer Customer
return System.Collections.Generic
        public Statement(Customer customer)
        {
            Customer = customer;

            MoviePrices = new Dictionary<string, double>();

            TotalAmount = 0;
            FrequentRenterPoints = 0;
            Name = Customer.Name;

            foreach (var rental in Customer.Rentals)
            {
                var thisAmount = rental.GetCharge();

                FrequentRenterPoints += rental.GetFrequentPoints();

                MoviePrices[rental.Movie.Title] = thisAmount;
                TotalAmount += thisAmount;
            }
        }
Statement