public static void InjectExceptionMessages(this ServiceOperationResult serviceOperationResult, InvalidStateException invalidStateException) { InjectInvalidValues(serviceOperationResult, invalidStateException.GetInvalidValues()); }
public static Exception ConvertToBrokenRulesException(this InvalidStateException invalidStateProblems) { BrokenRules brokenRules = invalidStateProblems.GetInvalidValues().ToBrokenRules(); return new BrokenRulesException("Problem writing changes to database. See BrokenRules", brokenRules); }