예제 #1
0
 // An overload tu support the params
 public CarConfiguration(
     ExteriorColor exteriorColor,
     AlloyWheels alloyWheels,
     Upholstery upholstery,
     InteriorTrims interiorTrims,
     params OptionalEquipment[] optionalEquipment)
     : this(exteriorColor, alloyWheels, upholstery, interiorTrims, optionalEquipment.AsEnumerable())
 {
 }
예제 #2
0
 public CarConfiguration(
     ExteriorColor exteriorColor,
     AlloyWheels alloyWheels,
     Upholstery upholstery,
     InteriorTrims interiorTrims,
     IEnumerable <OptionalEquipment> optionalEquipment)
 {
     ExteriorColor     = exteriorColor;
     AlloyWheels       = alloyWheels;
     Upholstery        = upholstery;
     InteriorTrims     = interiorTrims;
     OptionalEquipment = optionalEquipment;
 }
 public static CarConfiguration WithInteriorTrims(this CarConfiguration carConfiguration, InteriorTrims interiorTrims)
 {
     return(carConfiguration.With(interiorTrims: interiorTrims));
 }