public SoldArticle3(Warranty moneyBack, Warranty express, IWarrantyRulesFactory rulesFactory) { _moneyBackGuarantee = moneyBack ?? throw new ArgumentNullException(); _notOperationalWarranty = express ?? throw new ArgumentNullException(); _circuitWarranty = VoidWarranty.Instance; WarrantyRules = rulesFactory.Create(ClaimMoneyBack, ClaimNotOperational, ClaimCircuitry); }
public SoldArticle(IWarranty moneyBackGuarantee, IWarranty expressWarranty, IWarrantyRulesFactory rulesFactory) { MoneyBackGuarantee = moneyBackGuarantee ?? throw new ArgumentNullException(nameof(moneyBackGuarantee)); NotOperationalWarranty = expressWarranty ?? throw new ArgumentNullException(nameof(expressWarranty)); CircuitryWarranty = VoidWarranty.Instance; WarrantyRules = rulesFactory .Create(ClaimMoneyBack, ClaimNotOperationalWarranty, ClaimCircuitryWarranty); }
public SoldArticle(IWarranty moneyBack, IWarranty express, IWarrantyRulesFactory rulesFactory) { if (moneyBack == null) { throw new ArgumentNullException(nameof(moneyBack)); } if (express == null) { throw new ArgumentNullException(nameof(express)); } this.MoneyBackGuarantee = moneyBack; this.NotOperationalWarranty = express; this.CircuitryWarranty = VoidWarranty.Instance; this.WarrantyRules = rulesFactory.Create( this.ClaimMoneyBack, this.ClaimNotOperationalWarranty, this.ClaimCircuitryWarranty); }
public SoldArticle(IWarranty moneyBackGuatrantee, IWarranty expressWarranty, IWarrantyRulesFactory factory) { if (moneyBackGuatrantee == null) { throw new ArgumentNullException(nameof(moneyBackGuatrantee)); } if (expressWarranty == null) { throw new ArgumentNullException(nameof(expressWarranty)); } MoneyBackGuatrantee = moneyBackGuatrantee; NotOperationalWarranty = expressWarranty; CircutryWarranty = VoidWarranty.Instance; //IsOperational = true; WarrantyRules = factory.Create( ClaimMoneyBack, ClaimNotOperationalWarranty, ClaimCircuitryWarranty); }
public MoneyBackRule(Action <Action> claimAction, IWarrantyRules next) : base(next) { Claim = Forward; ClaimAction = claimAction; }
public NotOperationalRule(Action <Action> claimAction, IWarrantyRules next) : base(next) { ClaimAction = claimAction; Claim = Forward; }
public MoneyBackRule(Action <Action> claimAction, IWarrantyRules next) : base(next) { this.Claim = claimAction; }
public ConditionalRule(Func <bool> predicate, Action <Action> claimAction, IWarrantyRules next) { this.Predicate = predicate; this.ClaimAction = claimAction; this.Next = next; }
public ChainedRule(IWarrantyRules next) { this.Next = next; }
public CircuitryRule(Action <Action> claimAction, IWarrantyRules next) : base(next) { base.Claim = base.Forward; this.ClaimAction = claimAction; }
public CircuitryRule(Action <Action> claimAction, IWarrantyRules next) : base(next) { Claim = Forward; ClaimAction = claimAction; }
protected ChainedRule(IWarrantyRules next) { _next = next; Claim = Forward; }
public CircuitryRule(Action <Action> claimAction, IWarrantyRules next) : base(next) { _claimAction = claimAction; }
public NotOperationalRule(Action <Action> claimAction, IWarrantyRules next) : base(next) { base.Claim = base.Forward; this.ClaimAction = claimAction; }
protected ChainedRule(IWarrantyRules next) { Next = next; }
public ConditionalRule(Func <bool> predicate, Action <Action> claimAction, IWarrantyRules next) { _predicate = predicate; _claimAction = claimAction; _next = next; }
public NotOperationalRule(Action <Action> claimAction, IWarrantyRules next) : base(next) { _claimAction = claimAction; }