private void controller_LeMetaEventReceived(object sender, LeMetaEventReceivedEventArgs e) { if (e.LeMetaEvent == null) { return; } if (e.LeMetaEvent.SubEvent != LeMetaEvent.LeMetaSubEvent.AdvertisingReport) { return; } if (e.LeMetaEvent.AdvertisingEvents == null) { return; } foreach (var advertisingEvent in e.LeMetaEvent.AdvertisingEvents) { var beacon = Beacon.Parse(advertisingEvent); if (beacon != null) { BeaconDetected?.Invoke(this, new BeaconEventArgs(beacon)); continue; } var eddystone = Eddystone.Parse(advertisingEvent); if (eddystone != null) { EddystoneDetected?.Invoke(this, new EddystoneEventArgs(eddystone)); continue; } } }
private void controller_LeMetaEventReceived(object sender, LeMetaEventReceivedEventArgs e) { if (e.LeMetaEvent == null) { return; } if (e.LeMetaEvent.SubEvent != LeMetaEvent.LeMetaSubEvent.AdvertisingReport) { return; } if (e.LeMetaEvent.AdvertisingEvents == null) { return; } foreach (var advertisingEvent in e.LeMetaEvent.AdvertisingEvents) { var beacon = Beacon.Parse(advertisingEvent); if (beacon != null) { OnBeaconDetected(beacon); } } }