Class BroadcasterIsAlreadyStartedException
- Namespace
- Bluetooth.Abstractions.Broadcasting.Exceptions
- Assembly
- Bluetooth.Abstractions.Broadcasting.dll
Represents an exception that occurs when a Bluetooth broadcaster is already started.
public class BroadcasterIsAlreadyStartedException : BroadcasterFailedToStartException, ISerializable
- Inheritance
-
BroadcasterIsAlreadyStartedException
- Implements
- Inherited Members
Constructors
BroadcasterIsAlreadyStartedException(IBluetoothBroadcaster, string, Exception?)
Initializes a new instance of the BroadcasterIsAlreadyStartedException class.
public BroadcasterIsAlreadyStartedException(IBluetoothBroadcaster broadcaster, string message = "Broadcaster is already started", 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
ThrowIfIsStarted(IBluetoothBroadcaster)
Throws an BroadcasterIsAlreadyStartedException if the Bluetooth broadcaster is already started.
public static void ThrowIfIsStarted(IBluetoothBroadcaster broadcaster)
Parameters
broadcasterIBluetoothBroadcasterThe Bluetooth broadcaster to check.
Exceptions
- ArgumentNullException
Thrown when
broadcasteris null.- BroadcasterIsAlreadyStartedException
Thrown when the broadcaster is already running.