public AdapterContext(BleAdapterConfiguration config) { var opts = new CBCentralInitOptions { ShowPowerAlert = config?.ShowPowerAlert ?? false, #if __IOS__ RestoreIdentifier = config?.RestoreIdentifier ?? "pluginbluetoothle" #endif }; this.Manager = new CBCentralManager(this, config?.DispatchQueue, opts); }
public AdapterContext(BleAdapterConfiguration config) { config = config ?? new BleAdapterConfiguration(); var opts = new CBCentralInitOptions { ShowPowerAlert = config.ShowPowerAlert }; if (!config.RestoreIdentifier.IsEmpty()) { opts.RestoreIdentifier = config.RestoreIdentifier; } this.Manager = new CBCentralManager(this, config.DispatchQueue, opts); }
public AdapterContext(BleAdapterConfiguration config) { var opts = new CBCentralInitOptions { ShowPowerAlert = config.ShowPowerAlert }; #if __IOS__ if (!config.RestoreIdentifier.IsEmpty()) { opts.RestoreIdentifier = config?.RestoreIdentifier; } #endif this.Manager = new CBCentralManager(this, config?.DispatchQueue, opts); }
public CentralManager(BleAdapterConfiguration config = null) { this.context = new AdapterContext(config); }