private IEnumerable <KeyValuePair <string, string> > GetGlobalParameters() { if (!string.IsNullOrEmpty(Culture)) { yield return(new KeyValuePair <string, string>("c", Culture)); } if (UserLocation != null) { yield return(new KeyValuePair <string, string>("userLocation", UserLocation.ToString())); } if (UserMapView != null) { yield return(new KeyValuePair <string, string>("userMapView", string.Concat(UserMapView.SouthWest.ToString(), ",", UserMapView.NorthEast.ToString()))); } if (UserIP != null) { yield return(new KeyValuePair <string, string>("userIp", UserIP.ToString())); } if (IncludeNeighborhood) { yield return(new KeyValuePair <string, string>("inclnb", IncludeNeighborhood ? "1" : "0")); } if (MaxResults != null && MaxResults.Value > 0) { yield return(new KeyValuePair <string, string>("maxResults", Math.Min(MaxResults.Value, BINGMAXRESULTSVALUE).ToString())); } }
private IEnumerable <KeyValuePair <string, string> > GetGlobalParameters() { if (UserLocation != null) { yield return(new KeyValuePair <string, string>("prox", UserLocation.ToString())); } if (UserMapView != null) { yield return(new KeyValuePair <string, string>("mapview", string.Concat(UserMapView.SouthWest.ToString(), ",", UserMapView.NorthEast.ToString()))); } if (MaxResults != null && MaxResults.Value > 0) { yield return(new KeyValuePair <string, string>("maxresults", MaxResults.Value.ToString(CultureInfo.InvariantCulture))); } }
private IEnumerable <KeyValuePair <string, string> > GetGlobalParameters() { if (!string.IsNullOrEmpty(Culture)) { yield return(new KeyValuePair <string, string>("c", Culture)); } if (UserLocation != null) { yield return(new KeyValuePair <string, string>("userLocation", UserLocation.ToString())); } if (UserMapView != null) { yield return(new KeyValuePair <string, string>("userMapView", string.Concat(UserMapView.SouthWest.ToString(), ",", UserMapView.NorthEast.ToString()))); } if (UserIP != null) { yield return(new KeyValuePair <string, string>("userIp", UserIP.ToString())); } }