Exemplo n.º 1
0
 /// <summary>
 /// Find all UsbRegistry devices using a <see cref="UsbDeviceFinder"/> instance.
 /// </summary>
 /// <param name="usbDeviceFinder">The <see cref="UsbDeviceFinder"/> instance used to locate the usb registry devices.</param>
 /// <returns>All usb registry classes that match.</returns>
 public UsbRegDeviceList FindAll(UsbDeviceFinder usbDeviceFinder)
 {
     return(FindAll((Predicate <UsbRegistry>)usbDeviceFinder.Check));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Find the last UsbRegistry devices using a <see cref="UsbDeviceFinder"/> instance.
 /// </summary>
 /// <param name="usbDeviceFinder">The <see cref="UsbDeviceFinder"/> instance used to locate the usb registry devices.</param>
 /// <returns>A valid usb registry class if the device was found or Null if the device was not found.</returns>
 public UsbRegistry FindLast(UsbDeviceFinder usbDeviceFinder)
 {
     return(mUsbRegistryList.FindLast((Predicate <UsbRegistry>)usbDeviceFinder.Check));
 }
Exemplo n.º 3
0
        /// <summary>
        /// Saves a <see cref="UsbDeviceFinder"/> instance to a stream.
        /// </summary>
        /// <param name="usbDeviceFinder"></param>
        /// <param name="outStream"></param>
        public static void Save(UsbDeviceFinder usbDeviceFinder, Stream outStream)
        {
            BinaryFormatter formatter = new BinaryFormatter();

            formatter.Serialize(outStream, usbDeviceFinder);
        }