public static void Set(this LocationReference locationReference, NamedLocation namedLocation) { if (namedLocation is CountrySubdivision) { Set(locationReference, (CountrySubdivision)namedLocation); } else if (namedLocation is Region) { Set(locationReference, (Region)namedLocation); } else if (namedLocation is Locality) { Set(locationReference, (Locality)namedLocation); } else if (namedLocation is PostalCode) { Set(locationReference, (PostalCode)namedLocation); } else if (namedLocation is PostalSuburb) { Set(locationReference, (PostalSuburb)namedLocation); } }
public static void Set(this LocationReference locationReference, Country country, string unstructuredLocation, PostalCode postalCode) { Set(locationReference, unstructuredLocation, GetCountryFinder(country.Id).GetCountrySubdivision(null), postalCode); }