private static string ResolveNamedLocation(Country country, NamedLocation namedLocation, string location) { // If the location is the displayName then don't flip. if (string.Compare(location, namedLocation.Name, StringComparison.InvariantCultureIgnoreCase) == 0) { return(location); } // If the location is just a case variation on the full string representation then don't flip. if (string.Compare(location, namedLocation.ToString(), StringComparison.InvariantCultureIgnoreCase) == 0) { return(location); } // If it is using one of the location synonyms then don't flip. if (_locationQuery.IsLocationSynonym(country, location, namedLocation)) { return(location); } return(namedLocation.ToString()); }