public IEnumerable <Address> FindAddress(string postcode) { _logger.Debug("Calling AddressSearchService to find address for postcode={0}", postcode); Condition.Requires(postcode, "postcode").IsNotNullOrWhiteSpace(); try { return(_addressSearchProvider.FindAddress(postcode)); } catch (Exception e) { var message = string.Format("FindAddress failed for postcode {0}.", postcode); _logger.Debug(message, e); throw new CustomException(message, e, ErrorCodes.AddressSearchFailed); } }
public void Run() { _addressSearchProvider.FindAddress("EC1A 4JQ"); }