コード例 #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);
        }
コード例 #2
0
 public void AddFormatter(ICustomerFormatter formatter)
 {
     _formatters.Add(formatter);
 }
コード例 #3
0
 public void AddFormatter(ICustomerFormatter formatter)
 {
     _formatters.Add(formatter);
 }