Interface IDeviceMonitor
public interface IDeviceMonitor : IDisposable
- Inherited Members
Properties
IsMonitoring
Indicates whether the device monitor is currently monitoring devices. Returns false when the monitor is not started or the underlying discovery implementation is suspended or stopped.
bool IsMonitoring { get; }
Property Value
Methods
GetDevices()
ISet<IDevice> GetDevices()
Returns
GetDiscoveryType()
[Obsolete("Method will be removed in SDK version 3.")]
Type GetDiscoveryType()
Returns
Resume()
[Obsolete("Method will be removed in SDK version 3.")]
void Resume()
Start(SdkSession, int, CancellationToken)
[Obsolete("Use Start(SdkSession session, CancellationToken ct) instead. Method will be removed in SDK version 3.")]
Task Start(SdkSession session, int timeout_ms, CancellationToken ct)
Parameters
sessionSdkSessiontimeout_msintctCancellationToken
Returns
Start(SdkSession, CancellationToken)
Start the device monitor. May only be called once.
Task Start(SdkSession session, CancellationToken ct = default)
Parameters
sessionSdkSessionctCancellationToken
Returns
Exceptions
- InvalidOperationException
Thrown if the monitor is already started.
Suspend()
[Obsolete("Method will be removed in SDK version 3.")]
void Suspend()
TryGetDevice(string, out IDevice?)
bool TryGetDevice(string deviceId, out IDevice? device)
Parameters
Returns
Events
DeviceAccessDenied
This event is triggered when a connected device is inaccessible, e.g., when it is claimed by another process or when permission is denied.
event EventHandler<DeviceAccessDeniedEventArgs>? DeviceAccessDenied
Event Type
- EventHandler<DeviceAccessDeniedEventArgs>
DeviceConnected
This event is triggered when a device is connected. It will also trigger for all currently connected devices when device discovery starts.
event EventHandler<DeviceConnectionChangeEventArgs>? DeviceConnected
Event Type
DeviceDisconnected
This event is triggered when a device is disconnected. It will only occur for devices that have previously triggered the DeviceConnected event.
event EventHandler<DeviceConnectionChangeEventArgs>? DeviceDisconnected