PM.BLL/PMCommunicator.cs
/// <summary>
/// Cleans up a device, releasing interfaces and closing connection
/// </summary>
/// <param name="device">The device to close</param>
Cleans up a device, releasing interfaces and closing connection
Cleans up a device releasing interfaces and closing connection
private void Destroy(IUsbDevice device)
        {
            try
            {
                device.ReleaseInterface(device.Configs[0].Interfaces[0].Number);
                device.Close();
            }
            catch (Exception e)
            {
                _logger.LogWarning(e, "Attempted to clean up device, but failed.");
            }
        }
private void Destroy ( IUsbDevice device ) { try { device . ReleaseInterface ( device . Configs [ 0 ] . Interfaces [ 0 ] . Number ) ; device . Close ( ) ; } catch ( Exception e ) { _logger . LogWarning ( e , " " ) ; } }
Cleans up a device, releasing interfaces and closing connection
Cleans up a device releasing interfaces and closing connection
// Attempt to clean up device
device
IUsbDevice
The device to close
The device to close