public void CentralManager_DisconnectedPeripheral(CBCentralManager central, CBPeripheral peripheral, NSError error) { Debug.WriteLine("CentralManager_DisconnectedPeripheral"); BoardDisconnected?.Invoke(); if (_requestingDisconnect) { // Disconnect was because the user hit the disconnect button. if (_disconnectionCompletionSource != null) { _disconnectionCompletionSource.TrySetResult(true); } } else { Reconnect(); } }
public async Task Disconnect() { await Task.Delay(1000); BoardDisconnected?.Invoke(); }