//----------------------------------------------------------------------
        private static IntSet <PartyId> SearchByCounty(
            Timer t,
            AddressParserResult searchLocale,
            int desiredResultCount,
            int maxResultCount,
            double nonGeoMatchAbsDensity,
            out Location centroid,
            out double?maxRadiusMi)
        {
            maxRadiusMi = null;

            if (desiredResultCount == ExactMatchResultCount)
            {
                IntSet <PartyId> partiesInCounty = null;
                t.Measure("Search by County", delegate() {
                    partiesInCounty = Snap.Cache.Cache.County(searchLocale);
                });
                centroid = null;
                return(partiesInCounty);
            }
            else
            {
                IGeoCoder geocoder = GeoCoderFactory.CreateGeoCoder();
                centroid = geocoder.GeoCodeCounty(
                    searchLocale.County,
                    searchLocale.StateCode);
                return(SearchNearLocation(
                           t,
                           desiredResultCount,
                           centroid,
                           nonGeoMatchAbsDensity,
                           out maxRadiusMi));
            }
        }