mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use object initializer.
This commit is contained in:
@@ -90,10 +90,12 @@ partial class Device : Devices.Device
|
||||
}
|
||||
|
||||
// Windows is answering SCSI INQUIRY for all device types so it needs to be detected first
|
||||
var query = new StoragePropertyQuery();
|
||||
query.PropertyId = StoragePropertyId.Device;
|
||||
query.QueryType = StorageQueryType.Standard;
|
||||
query.AdditionalParameters = new byte[1];
|
||||
var query = new StoragePropertyQuery
|
||||
{
|
||||
PropertyId = StoragePropertyId.Device,
|
||||
QueryType = StorageQueryType.Standard,
|
||||
AdditionalParameters = new byte[1]
|
||||
};
|
||||
|
||||
IntPtr descriptorPtr = Marshal.AllocHGlobal(1000);
|
||||
var descriptorB = new byte[1000];
|
||||
|
||||
@@ -705,9 +705,11 @@ static partial class Usb
|
||||
if(!_portIsHub)
|
||||
return null;
|
||||
|
||||
var hub = new UsbHub();
|
||||
hub._hubIsRootHub = false;
|
||||
hub._hubDeviceDesc = "External Hub";
|
||||
var hub = new UsbHub
|
||||
{
|
||||
_hubIsRootHub = false,
|
||||
_hubDeviceDesc = "External Hub"
|
||||
};
|
||||
|
||||
// Open a handle to the Host Controller
|
||||
IntPtr h = CreateFile(_portHubDevicePath, GENERIC_WRITE, FILE_SHARE_WRITE, IntPtr.Zero, OPEN_EXISTING, 0,
|
||||
|
||||
Reference in New Issue
Block a user