Class BroadcasterIsAlreadyStoppedException
- Namespace
- Bluetooth.Abstractions.Broadcasting.Exceptions
- Assembly
- Bluetooth.Abstractions.Broadcasting.dll
Represents an exception that occurs when a Bluetooth broadcaster is already stopped.
public class BroadcasterIsAlreadyStoppedException : BroadcasterFailedToStopException, ISerializable
- Inheritance
-
BroadcasterIsAlreadyStoppedException
- Implements
- Inherited Members
Constructors
BroadcasterIsAlreadyStoppedException(IBluetoothBroadcaster, string, Exception?)
Initializes a new instance of the BroadcasterIsAlreadyStoppedException class.
public BroadcasterIsAlreadyStoppedException(IBluetoothBroadcaster broadcaster, string message = "Broadcaster is already stopped", Exception? innerException = null)
Parameters
broadcasterIBluetoothBroadcasterThe Bluetooth broadcaster associated with the exception.
messagestringA message that describes the error.
innerExceptionExceptionThe inner exception that caused the current exception, if any.
Methods
ThrowIfIsStopped(IBluetoothBroadcaster)
Throws an BroadcasterIsAlreadyStoppedException if the Bluetooth broadcaster is already stopped.
public static void ThrowIfIsStopped(IBluetoothBroadcaster broadcaster)
Parameters
broadcasterIBluetoothBroadcasterThe Bluetooth broadcaster to check.
Exceptions
- ArgumentNullException
Thrown when
broadcasteris null.- BroadcasterIsAlreadyStoppedException
Thrown when the broadcaster is already stopped.