示例#1
0
文件: World.cs 项目: formist/LinkMe
        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(),
            });
        }
示例#2
0
文件: World.cs 项目: formist/LinkMe
 public static void Set(this LocationReference locationReference, Country country, string unstructuredLocation, PostalCode postalCode)
 {
     Set(locationReference, unstructuredLocation, GetCountryFinder(country.Id).GetCountrySubdivision(null), postalCode);
 }
示例#3
0
文件: World.cs 项目: formist/LinkMe
 public static void Set(this LocationReference locationReference, string unstructuredLocation, CountrySubdivision countrySubdivision, PostalCode postalCode)
 {
     locationReference.Set(
         unstructuredLocation,
         postalCode.Clone(),
         countrySubdivision.Clone(),
         postalCode.Locality.Clone());
 }
示例#4
0
文件: World.cs 项目: formist/LinkMe
 public static IList <PostalSuburb> GetPostalSuburbs(this PostalCode postalCode)
 {
     return(GetFinder().GetPostalSuburbs(postalCode));
 }
示例#5
0
文件: World.cs 项目: formist/LinkMe
 public static CountrySubdivision GetCountrySubdivision(this PostalCode postalCode)
 {
     return(GetCountrySubdivision(postalCode.Locality));
 }
示例#6
0
 public void Add(PostalCode postalCode, IList <PostalSuburb> postalSuburbs)
 {
     _namedLocationsById[postalCode.Id] = postalCode;
     _postalCodeSuburbs[postalCode.Id]  = postalSuburbs;
 }
示例#7
0
 internal override GeographicalArea GetGeographicalArea()
 {
     return(PostalCode.GetGeographicalArea());
 }
示例#8
0
 internal override Locality GetLocality()
 {
     return(PostalCode.GetLocality());
 }