/// <summary>Raises the <see cref="BluetoothStateChanged" /> event.</summary> /// <param name="sender">The object that raised the event.</param> /// <param name="btState">Current state of the Bluetooth module</param> protected virtual void OnBluetoothStateChanged(Bluetooth sender, BluetoothState btState) { if (_onBluetoothStateChanged == null) { _onBluetoothStateChanged = OnBluetoothStateChanged; } BluetoothStateChanged?.Invoke(sender, btState); }
/// <summary> /// Raises the <see cref="BluetoothStateChanged"/> event. /// </summary> /// <param name="sender">The object that raised the event.</param> /// <param name="btState">Current state of the Bluetooth module</param> protected virtual void OnBluetoothStateChanged(Bluetooth sender, BluetoothState btState) { if (onBluetoothStateChanged == null) { onBluetoothStateChanged = new BluetoothStateChangedHandler(OnBluetoothStateChanged); } if (Program.CheckAndInvoke(BluetoothStateChanged, onBluetoothStateChanged, sender, btState)) { BluetoothStateChanged(sender, btState); } }
/// <summary> /// Raises the <see cref="BluetoothStateChanged"/> event. /// </summary> /// <param name="sender">The object that raised the event.</param> /// <param name="btState">Current state of the Bluetooth module</param> protected virtual void OnBluetoothStateChanged(Bluetooth sender, BluetoothState btState) { if (onBluetoothStateChanged == null) onBluetoothStateChanged = new BluetoothStateChangedHandler(OnBluetoothStateChanged); if (Program.CheckAndInvoke(BluetoothStateChanged, onBluetoothStateChanged, sender, btState)) { BluetoothStateChanged(sender, btState); } }