public void Rate() { Logger.Log("Starting rate."); Logger.Log("Loading policy."); string policyJson = PolicySource.GetPolicyFromSource(); var policy = PolicySerializer.GetPolicyFromJsonString(policyJson); var factory = new RaterFactory(); var rater = factory.Create(policy, this); rater.Rate(policy); Logger.Log("Rating completed."); }
public void Rate() { // Logging - how is delegated Logger.Log("Starting rate."); Logger.Log("Loading policy."); // Persistence - how is delegated var policyJson = PolicySource.GetPolicyFromSource(); // Encoding Format - how is delegated var policy = PolicySerializer.GetPolicyFromJsonString(policyJson); var factory = new RaterFactory(); var rater = factory.Create(policy, this); rater?.Rate(policy); Logger.Log("Rating completed."); }