public BLE(IBluetoothPacketProvider provider) { if (provider != null) { manager = new BeaconManager(provider); manager.BeaconAdded += (s, b) => BeaconAdded.Invoke(s, b); provider.AdvertisementPacketReceived += (s, e) => AdvertisementPacketReceived.Invoke(s, e); } }
private void ScanCallback_OnAdvertisementPacketReceived(object sender, BLEAdvertisementPacketArgs e) { AdvertisementPacketReceived?.Invoke(this, e); }
private void WatcherOnReceived(BluetoothLEAdvertisementWatcher sender, BluetoothLEAdvertisementReceivedEventArgs eventArgs) { AdvertisementPacketReceived?.Invoke(this, new BLEAdvertisementPacketArgs(eventArgs.ToUniversalBLEPacket())); }