Esempio n. 1
0
 public ApprovalResponse Approve(IExpenseReport expenseReport)
 {
     ApprovalResponse response = _approver.ApproveExpense(expenseReport);
     if (response == ApprovalResponse.BeyondApprovalLimit && _next != null)
     {
         return _next.Approve(expenseReport);
     }
     return response;
 }
Esempio n. 2
0
 public ApprovalResponse ApproveExpense(IExpenseReport expenseReport)
 {
     return expenseReport.Total > _approvalLimit
             ? ApprovalResponse.BeyondApprovalLimit
             : ApprovalResponse.Approved;
 }
 public ApprovalResponse Approve(IExpenseReport expenseReport)
 {
     return ApprovalResponse.Denied;
 }