private static void _manager_RetrievedPeripherals(object sender, CBPeripheralsEventArgs e) { foreach (CBPeripheral p in e.Peripherals) { _devices.Add(new DeviceInformation(p,string.Empty)); } retrievedHandle.Set(); }
private void ManagerOnRetrievedConnectedPeripherals(object sender, CBPeripheralsEventArgs e) { _devices = new List <BluetoothDevice>(); foreach (var peripheral in e.Peripherals) { _devices.Add(new BluetoothDevice(peripheral.Name, peripheral.Identifier.AsString())); _nativeDevices.Add(peripheral); } }
private void CentralManagerOnRetrievedPeripherals(object sender, CBPeripheralsEventArgs e) { foreach (CBPeripheral p in e.Peripherals) { if (!retrievedDevices.Contains(p)) { retrievedDevices.Add(p); Console.WriteLine(p.Name); } } Console.WriteLine("Retrieved Peripherals"); }
private void OnRetrievedConnectedPeripherals(object sender, CBPeripheralsEventArgs e) => _wes.RaiseEvent(nameof(RetrievedConnectedPeripherals), sender, e);
/// <summary> /// Managers the on retrieved connected peripherals. /// </summary> /// <param name="sender">The sender.</param> /// <param name="cbPeripheralsEventArgs">The <see cref="CBPeripheralsEventArgs"/> instance containing the event data.</param> private void ManagerOnRetrievedConnectedPeripherals(object sender, CBPeripheralsEventArgs cbPeripheralsEventArgs) { System.Diagnostics.Debug.WriteLine(cbPeripheralsEventArgs); }
private void ManagerOnRetrievedConnectedPeripherals(object sender, CBPeripheralsEventArgs cbPeripheralsEventArgs) { System.Diagnostics.Debug.WriteLine(cbPeripheralsEventArgs); }
private static void _manager_RetrievedConnectedPeripherals(object sender, CBPeripheralsEventArgs e) { throw new NotImplementedException(); }
private void ManagerOnRetrievedPeripherals(object sender, CBPeripheralsEventArgs e) { }