コード例 #1
0
 public SoldArticle2(Warranty moneyBackGuarantee, Warranty express)
 {
     _moneyBackGuarantee     = moneyBackGuarantee ?? throw new ArgumentNullException(nameof(moneyBackGuarantee));
     _notOperationalWarranty = express ?? throw new ArgumentNullException(nameof(express));
     _circuitWarranty        = VoidWarranty.Instance;
     _operationalStatus      = DeviceStatus.AllFine();
     _warrantyMap            = InitializeWarrantyMap();
 }
コード例 #2
0
 private IReadOnlyDictionary <DeviceStatus, Action <Action> > InitializeWarrantyMap()
 => new Dictionary <DeviceStatus, Action <Action> >()
 {
     [DeviceStatus.AllFine().NotOperational()] = ClaimWarranty
 };