예제 #1
0
        Blockdevice GetDeviceByModel(string serialId)
        {
            Blockdevice x = null;

            lock (storageDevices)
            {
                x = storageDevices.GetDeviceByModel(serialId);
            }
            return(x);
        }
예제 #2
0
        Blockdevice UpdateDisk(UsbDevice device)
        {
            Blockdevice dev = GetSDevice(device.iSerial);

            if (dev == null)
            {
                dev = GetDeviceByModel(device.idProduct);
            }

            return(dev);
        }
예제 #3
0
        public Blockdevice GetDevice(string serialId)
        {
            Blockdevice r = null;

            foreach (Blockdevice d in Blockdevices.ToArray())
            {
                if (serialId == d.Serial)
                {
                    r = d;
                    break;
                }
            }
            return(r);
        }
예제 #4
0
        public Blockdevice GetDeviceByModel(string modelName)
        {
            Blockdevice r = null;

            foreach (Blockdevice d in Blockdevices.ToArray())
            {
                if (modelName == d.Model)
                {
                    r = d;
                    break;
                }
            }
            return(r);
        }