示例#1
0
 public MovieTicket()
 {
     discountList    = new List <string>();
     tickeTypeSource = new List <ComboBoxItem>();
     benefit         = new DefaultBenefit();
 }
示例#2
0
文件: Cart.cs 项目: gospella/oop_csu
 public void AddBonus(IBenefit bonus)
 {
     bonuses.Add(bonus);
 }
示例#3
0
 public static IBenefit Copy(this IBenefit benefit)
 {
     return(benefit switch {
         DemoBenefit demoBenefit => new DemoBenefit(),
         _ => throw new NotImplementedException($"{nameof(Copy)} not implemented for benefit {benefit.Name}")
     });
示例#4
0
 public DeductibleController(IBenefit benefit)
 {
     _benefit = benefit;
 }
示例#5
0
 public OopMaxController(IBenefit benefit)
 {
     _benefit = benefit;
 }
示例#6
0
 public MovieTicket()
 {
     discountList = new List<string>();
     tickeTypeSource = new List<ComboBoxItem>();
     benefit = new DefaultBenefit();
 }