static void OnDeviceConnected(IOBluetoothDevice device) { if (DeviceConnected != null) { DeviceConnected(null, new DeviceConnectedEventArgs(device)); } }
public override void ConnectionComplete(IOBluetoothDevice device, IOReturn status) { // TODO: log errors here if (device == null || device.connectionTaskCompletionSource == null) { return; } if (status == IOReturn.Success) { device.connectionTaskCompletionSource.TrySetResult(device); } else { device.connectionTaskCompletionSource.TrySetException(status.ToNSErrorException()); } device.connectionTaskCompletionSource = null; }
public DeviceConnectedEventArgs(IOBluetoothDevice device) { Device = device; }
void OnConnectNotification(IOBluetoothUserNotification notification, IOBluetoothDevice device) { onDeviceConnected(device); }
public DeviceConnectedEventArgs (IOBluetoothDevice device) { Device = device; }
public override void ConnectionComplete (IOBluetoothDevice device, IOReturn status) { // TODO: log errors here if (device == null || device.connectionTaskCompletionSource == null) return; if (status == IOReturn.Success) device.connectionTaskCompletionSource.TrySetResult (device); else device.connectionTaskCompletionSource.TrySetException (status.ToNSErrorException ()); device.connectionTaskCompletionSource = null; }
void OnConnectNotification (IOBluetoothUserNotification notification, IOBluetoothDevice device) { onDeviceConnected (device); }
static void OnDeviceConnected (IOBluetoothDevice device) { if (DeviceConnected != null) DeviceConnected (null, new DeviceConnectedEventArgs (device)); }