Class LibUsbFactoryExtensions
Inheritance
System.Object
LibUsbFactoryExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Device.Net.LibUsb
Assembly: Device.Net.LibUsb.dll
Syntax
public static class LibUsbFactoryExtensions
Methods
CreateLibUsbDeviceFactory(FilterDeviceDefinition, ILoggerFactory, Nullable<Int32>, Nullable<UInt16>, Nullable<UInt16>, Func<ConnectedDeviceDefinition, CancellationToken, Task<Boolean>>)
Declaration
public static IDeviceFactory CreateLibUsbDeviceFactory(this FilterDeviceDefinition filterDeviceDefinition, ILoggerFactory loggerFactory = null, int? timeout = null, ushort? writeBufferSize = null, ushort? readBufferSize = null, Func<ConnectedDeviceDefinition, CancellationToken, Task<bool>> supportsDevice = null)
Parameters
Type | Name | Description |
---|---|---|
FilterDeviceDefinition | filterDeviceDefinition | |
Microsoft.Extensions.Logging.ILoggerFactory | loggerFactory | |
System.Nullable<System.Int32> | timeout | |
System.Nullable<System.UInt16> | writeBufferSize | |
System.Nullable<System.UInt16> | readBufferSize | |
System.Func<ConnectedDeviceDefinition, System.Threading.CancellationToken, System.Threading.Tasks.Task<System.Boolean>> | supportsDevice |
Returns
Type | Description |
---|---|
IDeviceFactory |
CreateLibUsbDeviceFactory(IReadOnlyList<FilterDeviceDefinition>, ILoggerFactory, Nullable<Int32>, Nullable<UInt16>, Nullable<UInt16>, Func<ConnectedDeviceDefinition, CancellationToken, Task<Boolean>>)
Declaration
public static IDeviceFactory CreateLibUsbDeviceFactory(this IReadOnlyList<FilterDeviceDefinition> filterDeviceDefinitions, ILoggerFactory loggerFactory = null, int? timeout = null, ushort? writeBufferSize = null, ushort? readBufferSize = null, Func<ConnectedDeviceDefinition, CancellationToken, Task<bool>> supportsDevice = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyList<FilterDeviceDefinition> | filterDeviceDefinitions | |
Microsoft.Extensions.Logging.ILoggerFactory | loggerFactory | |
System.Nullable<System.Int32> | timeout | |
System.Nullable<System.UInt16> | writeBufferSize | |
System.Nullable<System.UInt16> | readBufferSize | |
System.Func<ConnectedDeviceDefinition, System.Threading.CancellationToken, System.Threading.Tasks.Task<System.Boolean>> | supportsDevice |
Returns
Type | Description |
---|---|
IDeviceFactory |
GetConnectedDeviceDefinitionsAsync(IReadOnlyList<FilterDeviceDefinition>, CancellationToken)
Declaration
public static Task<IEnumerable<ConnectedDeviceDefinition>> GetConnectedDeviceDefinitionsAsync(IReadOnlyList<FilterDeviceDefinition> filterDeviceDefinitions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyList<FilterDeviceDefinition> | filterDeviceDefinitions | |
System.Threading.CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ConnectedDeviceDefinition>> |
GetDevice(ConnectedDeviceDefinition)
Declaration
public static UsbDevice GetDevice(ConnectedDeviceDefinition deviceDefinition)
Parameters
Type | Name | Description |
---|---|---|
ConnectedDeviceDefinition | deviceDefinition |
Returns
Type | Description |
---|---|
LibUsbDotNet.UsbDevice |