using System;
namespace OpenMacroBoard.SDK
{
///
/// An event argument that reports a connection status change for a particular device.
///
public class DeviceConnectionChangedEventArgs : EventArgs
{
///
/// Initializes a new instance of the class.
///
/// A device reference.
/// The current connection state.
public DeviceConnectionChangedEventArgs(IDeviceReference deviceReference, bool connected)
{
DeviceReference = deviceReference ?? throw new ArgumentNullException(nameof(deviceReference));
Connected = connected;
}
///
/// Gets a handle to the device that changed.
///
public IDeviceReference DeviceReference { get; }
///
/// Gets a value that indicates the connection state change. True if the device got connected,
/// false if the device got disconnected.
///
public bool Connected { get; }
}
}