public void Eval(Lead lead, ActionResponse response, Dictionary <string, LeadType> leadTypeLookup) { Contract.Requires(lead != null); if (lead.IsInConfirmInterestPhase) { _interestConfirmationEval.EvalResponse(lead.Confirmation, response, lead); if (lead.Confirmation.IsRejected && !lead.Confirmation.IsAwaiting) { lead.Close(); } if (!lead.StopAfterConfirmation && lead.Confirmation.IsAccepted) { // move the Lead on to the next phase so the customer can complete the application var leadType = leadTypeLookup[lead.LeadTypeId]; lead.StartNewApplication(leadType); } } else if (lead.IsInApplicationPhase) { _applicationEval.EvalResponse(lead.Application, response, lead); if (lead.Application.IsRejected && !lead.Application.IsAwaiting) { lead.Close(); } } else { // TODO: log this scenario because an open lead MUST be in either 1 of those phases. } }