public decimal Execute(ShoppingCart context, Func <ShoppingCart, decimal> executeNext) { if (rule.Validate(context)) { rule.ApplyPromotion(context); } return(executeNext(context)); }
public decimal Execute(ShoppingCart context, Func <ShoppingCart, decimal> executeNext) { if (rule.Validate(context)) { rule.ApplyPromotion(context); } return(executeNext(context)); }