When I try to take the Bing search container and add manually
query.AddQueryOption("Latitude", Double.Parse(localSettings.Values["latitude"].ToString()));
query.AddQueryOption("Longitude", Double.Parse(localSettings.Values["longitude"].ToString()));
It shows the same behaviour of not formatting the input for its own use. When I expand and inspect the values, I the usual error message which is:
Data = {System.Collections.ListDictionaryInternal}
Message = "Unable to load resources for resource file \"System.Data.Services.Client\" in package "."
Source = "mscorlib"
StackTrace = " at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)\r\n at System.Data.Services.Client.TextRes.GetString(String name)\r\n at System.Data.Services.Client.Strings.get_DataServiceQuery_EnumerationNotSupported()\r\n
at Syst...
TargetSite = {System.String GetString(System.String, System.Globalization.CultureInfo)}
When I dig further at some level there shows additionally:
[System.InvalidOperationException] = {"Method may only be called on a Type for which Type.IsGenericParameter is true."}
As ResourceManager is involved it seems like some localization/culture issue. However it is clear that once I manually call the api through the browser and append latitude and longitude with dots manually, or remove langitude and longitude completely, the
call works just fine and returns the requested values.
So somewhere the it seems these values get mishandled.