DesktopAnalytics.Analytics.GetLocationPropertiesOfThisMachine C# (CSharp) Метод

GetLocationPropertiesOfThisMachine() приватный Метод

private GetLocationPropertiesOfThisMachine ( ) : string>>.IEnumerable
Результат string>>.IEnumerable
		private IEnumerable<KeyValuePair<string, string>> GetLocationPropertiesOfThisMachine()
		{
			using (var client = new WebClient())
			{
				var json = client.DownloadString("http://freegeoip.net/json");
				JObject results = JObject.Parse(json);
				yield return new KeyValuePair<string, string>("Country", (string)results["country_name"]);
				yield return new KeyValuePair<string, string>("City", (string)results["city"]);
			}
		}