Exemplo n.º 1
0
        public SerializedData GetStatement(ICustomerFormatter formatter)
        {
            foreach (Rental rental in Rentals)
            {
                double thisAmount = rental.GetCharge();
                FrequentRenterPoints += rental.GetFrequentPoints();
                Movies.Add(rental.Movie.Title, thisAmount);
                TotalAmount += thisAmount;
            }

            var serializedData = new SerializedData();

            formatter.Serialize(serializedData, this);

            return(serializedData);
        }
Exemplo n.º 2
0
 public void AddFormatter(ICustomerFormatter formatter)
 {
     _formatters.Add(formatter);
 }
Exemplo n.º 3
0
 public void AddFormatter(ICustomerFormatter formatter)
 {
     _formatters.Add(formatter);
 }