Beispiel #1
0
        public static PostalCode Clone(this PostalCode postalCode)
        {
            if (postalCode == null)
            {
                return(null);
            }

            return(new PostalCode
            {
                Id = postalCode.Id,
                Name = postalCode.Name,
                Locality = postalCode.Locality.Clone(),
            });
        }
Beispiel #2
0
 public static void Set(this LocationReference locationReference, Country country, string unstructuredLocation, PostalCode postalCode)
 {
     Set(locationReference, unstructuredLocation, GetCountryFinder(country.Id).GetCountrySubdivision(null), postalCode);
 }
Beispiel #3
0
 public static void Set(this LocationReference locationReference, string unstructuredLocation, CountrySubdivision countrySubdivision, PostalCode postalCode)
 {
     locationReference.Set(
         unstructuredLocation,
         postalCode.Clone(),
         countrySubdivision.Clone(),
         postalCode.Locality.Clone());
 }
Beispiel #4
0
 public static IList <PostalSuburb> GetPostalSuburbs(this PostalCode postalCode)
 {
     return(GetFinder().GetPostalSuburbs(postalCode));
 }
Beispiel #5
0
 public static CountrySubdivision GetCountrySubdivision(this PostalCode postalCode)
 {
     return(GetCountrySubdivision(postalCode.Locality));
 }
Beispiel #6
0
 public void Add(PostalCode postalCode, IList <PostalSuburb> postalSuburbs)
 {
     _namedLocationsById[postalCode.Id] = postalCode;
     _postalCodeSuburbs[postalCode.Id]  = postalSuburbs;
 }
Beispiel #7
0
 internal override GeographicalArea GetGeographicalArea()
 {
     return(PostalCode.GetGeographicalArea());
 }
Beispiel #8
0
 internal override Locality GetLocality()
 {
     return(PostalCode.GetLocality());
 }