コード例 #1
0
 // TODO :this should be done by DI framework and cleaned up from this class
 public OrderProcessor(
     ICommissionHandler commissionHandler,
     IPackageSlipPrinter packageSlipPrinter,
     IEmailClient emailClient,
     IMembershipRepository membershipRepository,
     ISpecialRuleRepository specialRuleRepository)
 {
     this.commissionHandler     = commissionHandler;
     this.packageSlipPrinter    = packageSlipPrinter;
     this.emailClient           = emailClient;
     this.membershipRepository  = membershipRepository;
     this.specialRuleRepository = specialRuleRepository;
 }
コード例 #2
0
 public DigitalProductPurchaseHandler(ISpecialRuleRepository specialRulesRepository)
 {
     this.specialRulesRepository = specialRulesRepository ?? throw new ArgumentNullException(nameof(specialRulesRepository));
 }