public static AddressLocation ParseLocation(string locationString)
        {
            var location = new AddressLocation { City = "", State = "" };

            if (string.IsNullOrWhiteSpace(locationString))
                return location;

            var parts = locationString.Split(",".ToCharArray());

            switch (parts.Length)
            {
                case 0:
                    break;
                case 1:
                    location.State = parts[0].Trim();
                    break;
                case 2:
                    location.City = parts[0].Trim();
                    location.State = parts[1].Trim();
                    break;
                case 3:
                    location.City = parts[0].Trim();
                    location.State = parts[1].Trim();
                    break;
            }

            return location;
        }
        public static AddressLocation ParseLocation(string locationString)
        {
            var location = new AddressLocation {
                City = "", State = ""
            };

            if (string.IsNullOrWhiteSpace(locationString))
            {
                return(location);
            }

            var parts = locationString.Split(",".ToCharArray());

            switch (parts.Length)
            {
            case 0:
                break;

            case 1:
                location.State = parts[0].Trim();
                break;

            case 2:
                location.City  = parts[0].Trim();
                location.State = parts[1].Trim();
                break;

            case 3:
                location.City  = parts[0].Trim();
                location.State = parts[1].Trim();
                break;
            }

            return(location);
        }
 private CityRecord Geocode(AddressLocation location)
 {
     if (!string.IsNullOrWhiteSpace(location.City) && !string.IsNullOrWhiteSpace(location.State))
     {
         return _geocoder.GetCity(location.City, location.State);
     }
     else
     {
         return null;
     }
 }
 private CityRecord Geocode(AddressLocation location)
 {
     if (!string.IsNullOrWhiteSpace(location.City) && !string.IsNullOrWhiteSpace(location.State))
     {
         return(_geocoder.GetCity(location.City, location.State));
     }
     else
     {
         return(null);
     }
 }