public string GenerateMergeKey() { var mergeKey = $"{StateTerritory}|{LocalityName}|{Postcode}|"; if (PostalDeliveryType.HasValue()) { if (PostalDeliveryNumber.HasValue()) { mergeKey += $"|||{PostalDeliveryType} {PostalDeliveryNumber}||||||"; } else { mergeKey += $"|||{PostalDeliveryType}||||||"; } } else { if (StreetNumber1.HasValue()) { mergeKey += $"{StreetName}|{StreetType}|{StreetSuffix}|{StreetNumber1}|"; } else { mergeKey += $"{StreetName}|{StreetType}|{StreetSuffix}|LOT {LotIdentifier}|"; } mergeKey += $"{StreetNumber2}|{SiteName}|{ComplexUnitType}|{ComplexUnitIdentifier}|{ComplexLevelType}|{ComplexLevelNumber}"; } return(mergeKey); }
public string GenerateDisplayAddress() { // full_address_string = (postal_address / street_address) locality_part var displayAddressBuilder = new StringBuilder(); if (PostalDeliveryType.HasValue()) { BuildPostalAddressPart(displayAddressBuilder); } else { BuildStreetAddress(displayAddressBuilder); } BuildLocalityPart(displayAddressBuilder); return(displayAddressBuilder.ToString()); }
public string GenerateCompletionAddress(string locality, bool includeSiteName) { // full_address_string = (postal_address / street_address) locality_part var displayAddressBuilder = new StringBuilder(); if (PostalDeliveryType.HasValue()) { BuildPostalAddressPart(displayAddressBuilder); } else { BuildStreetAddress(displayAddressBuilder, includeSiteName); } BuildLocalityPart(displayAddressBuilder, locality); return(displayAddressBuilder.ToString()); }