C# Class LibUsbDotNet.Main.UsbDeviceFinder

Finds and identifies usb devices. Used for easily locating
Instances of this class can optionally be passed directly into UsbDevice.OpenUsbDevice(LibUsbDotNet.Main.UsbDeviceFinder) to quickly find and open a specific usb device in one step. Pass instances of this class into the UsbRegDeviceList.Find(UsbDeviceFinder), UsbRegDeviceList.FindAll(UsbDeviceFinder), or UsbRegDeviceList.FindLast(UsbDeviceFinder) functions of a UsbRegDeviceList instance to find connected usb devices without opening devices or interrogating the bus. After locating the required UsbRegistry instance, call the UsbRegistry.Open method to start using the UsbDevice instance.
Inheritance: ISerializable
Afficher le fichier Open project: arvydas/BlinkStickDotNet Class Usage Examples

Méthodes publiques

Свойство Type Description
NO_GUID System.Guid

Méthodes publiques

Méthode Description
Check ( UsbDevice usbDevice ) : bool

Dynamic predicate find function. Pass this function into any method that has a Predicate{UsbDevice} parameter.

Override this member when inheriting the UsbDeviceFinder class to change/alter the matching behavior.

Check ( UsbRegistry usbRegistry ) : bool

Dynamic predicate find function. Pass this function into any method that has a Predicate{UsbRegistry} parameter.

Override this member when inheriting the UsbDeviceFinder class to change/alter the matching behavior.

GetObjectData ( SerializationInfo info, StreamingContext context ) : void

Store this class as a binary serializtion object.

Load ( Stream deviceFinderStream ) : UsbDeviceFinder

Load usb device finder properties from a binary stream.

Save ( UsbDeviceFinder usbDeviceFinder, Stream outStream ) : void

Saves a UsbDeviceFinder instance to a stream.

UsbDeviceFinder ( System.Guid deviceInterfaceGuid ) : System

Creates a UsbDeviceFinder class for locating usb devices by a unique Guid string.

UsbDeviceFinder ( int vid ) : System

Creates a UsbDeviceFinder class for locating usb devices.

UsbDeviceFinder ( int vid, int pid ) : System

Creates a UsbDeviceFinder class for locating usb devices vendor and product ID.

UsbDeviceFinder ( int vid, int pid, int revision ) : System

Creates a UsbDeviceFinder class for locating usb devices by VendorID, ProuctID, and Revision code.

UsbDeviceFinder ( int vid, int pid, int revision, string serialNumber, System.Guid deviceInterfaceGuid ) : System

Creates a UsbDeviceFinder class for locating and identifying usb devices.

UsbDeviceFinder ( int vid, int pid, string serialNumber ) : System

Creates a UsbDeviceFinder class for locating usb devices by VendorID, ProductID, and Serial number.

UsbDeviceFinder ( string serialNumber ) : System

Creates a UsbDeviceFinder class for locating usb devices by a serial number.

Méthodes protégées

Méthode Description
UsbDeviceFinder ( ) : System

UsbDeviceFinder ( SerializationInfo info, StreamingContext context ) : System

Use a serialization stream to fill the UsbDeviceFinder class.

Method Details

Check() public méthode

Dynamic predicate find function. Pass this function into any method that has a Predicate{UsbDevice} parameter.
Override this member when inheriting the UsbDeviceFinder class to change/alter the matching behavior.
public Check ( UsbDevice usbDevice ) : bool
usbDevice UsbDevice The UsbDevice to check.
Résultat bool

Check() public méthode

Dynamic predicate find function. Pass this function into any method that has a Predicate{UsbRegistry} parameter.
Override this member when inheriting the UsbDeviceFinder class to change/alter the matching behavior.
public Check ( UsbRegistry usbRegistry ) : bool
usbRegistry UsbRegistry The UsbRegistry device to check.
Résultat bool

GetObjectData() public méthode

Store this class as a binary serializtion object.
public GetObjectData ( SerializationInfo info, StreamingContext context ) : void
info System.Runtime.Serialization.SerializationInfo The serialization instance to populate.
context System.Runtime.Serialization.StreamingContext
Résultat void

Load() public static méthode

Load usb device finder properties from a binary stream.
public static Load ( Stream deviceFinderStream ) : UsbDeviceFinder
deviceFinderStream Stream The binary stream containing a ///
Résultat UsbDeviceFinder

Save() public static méthode

Saves a UsbDeviceFinder instance to a stream.
public static Save ( UsbDeviceFinder usbDeviceFinder, Stream outStream ) : void
usbDeviceFinder UsbDeviceFinder
outStream Stream
Résultat void

UsbDeviceFinder() protected méthode

protected UsbDeviceFinder ( ) : System
Résultat System

UsbDeviceFinder() public méthode

Creates a UsbDeviceFinder class for locating usb devices by a unique Guid string.
public UsbDeviceFinder ( System.Guid deviceInterfaceGuid ) : System
deviceInterfaceGuid System.Guid The unique to find.
Résultat System

UsbDeviceFinder() protected méthode

Use a serialization stream to fill the UsbDeviceFinder class.
protected UsbDeviceFinder ( SerializationInfo info, StreamingContext context ) : System
info System.Runtime.Serialization.SerializationInfo
context System.Runtime.Serialization.StreamingContext
Résultat System

UsbDeviceFinder() public méthode

Creates a UsbDeviceFinder class for locating usb devices.
public UsbDeviceFinder ( int vid ) : System
vid int The vendor id of the usb device to find.
Résultat System

UsbDeviceFinder() public méthode

Creates a UsbDeviceFinder class for locating usb devices vendor and product ID.
public UsbDeviceFinder ( int vid, int pid ) : System
vid int The vendor id of the usb device to find.
pid int The product id of the usb device to find.
Résultat System

UsbDeviceFinder() public méthode

Creates a UsbDeviceFinder class for locating usb devices by VendorID, ProuctID, and Revision code.
public UsbDeviceFinder ( int vid, int pid, int revision ) : System
vid int The vendor id of the usb device to find.
pid int The product id of the usb device to find.
revision int The revision number of the usb device to find.
Résultat System

UsbDeviceFinder() public méthode

Creates a UsbDeviceFinder class for locating and identifying usb devices.
public UsbDeviceFinder ( int vid, int pid, int revision, string serialNumber, System.Guid deviceInterfaceGuid ) : System
vid int The vendor id of the usb device to find, or to ignore.
pid int The product id of the usb device to find, or to ignore.
revision int The revision number of the usb device to find, or to ignore.
serialNumber string The serial number of the usb device to find, or null to ignore.
deviceInterfaceGuid System.Guid The unique guid of the usb device to find, or to ignore.
Résultat System

UsbDeviceFinder() public méthode

Creates a UsbDeviceFinder class for locating usb devices by VendorID, ProductID, and Serial number.
public UsbDeviceFinder ( int vid, int pid, string serialNumber ) : System
vid int The vendor id of the usb device to find.
pid int The product id of the usb device to find.
serialNumber string The serial number of the usb device to find.
Résultat System

UsbDeviceFinder() public méthode

Creates a UsbDeviceFinder class for locating usb devices by a serial number.
public UsbDeviceFinder ( string serialNumber ) : System
serialNumber string The serial number of the usb device to find.
Résultat System

Property Details

NO_GUID public_oe static_oe property

The "exclude from search" value for DeviceInterfaceGuid.
public static Guid,System NO_GUID
Résultat System.Guid