Exemple #1
0
        async void RangingBeaconsInRegion(object sender, RangeEventArgs e)
        {
            await ClearData();

            var allBeacons = new List <Beacon>();

            if (e.Beacons.Count > 0)
            {
                foreach (var b in e.Beacons)
                {
                    allBeacons.Add(b);
                }

                var orderedBeacons = allBeacons.OrderBy(b => b.Distance).ToList();
                await UpdateData(orderedBeacons);
            }
            else
            {
                // unknown
                await ClearData();
            }
        }
		async void RangingBeaconsInRegion(object sender, RangeEventArgs e)
		{
			await ClearData();

			var allBeacons = new List<Beacon>();
			if(e.Beacons.Count > 0)
			{
				foreach(var b in e.Beacons)
				{
					allBeacons.Add(b);
				}

				var orderedBeacons = allBeacons.OrderBy(b => b.Distance).ToList();
				await UpdateData(orderedBeacons);
			}
			else
			{
				// unknown
				await ClearData();
			}
		}