Show / Hide Table of Contents

Class DeviceExtensions

Inheritance
System.Object
DeviceExtensions
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
Assembly: Device.Net.dll
Syntax
public static class DeviceExtensions

Methods

Aggregate(IDeviceFactory, IDeviceFactory, ILoggerFactory)

Declaration
public static IDeviceFactory Aggregate(this IDeviceFactory deviceFactory, IDeviceFactory newDeviceFactory, ILoggerFactory loggerFactory = null)
Parameters
Type Name Description
IDeviceFactory deviceFactory
IDeviceFactory newDeviceFactory
Microsoft.Extensions.Logging.ILoggerFactory loggerFactory
Returns
Type Description
IDeviceFactory

Aggregate(IList<IDeviceFactory>, ILoggerFactory)

Creates a new IDeviceFactory that contains with the existing deviceFactories

Declaration
public static IDeviceFactory Aggregate(this IList<IDeviceFactory> deviceFactories, ILoggerFactory loggerFactory = null)
Parameters
Type Name Description
System.Collections.Generic.IList<IDeviceFactory> deviceFactories
Microsoft.Extensions.Logging.ILoggerFactory loggerFactory
Returns
Type Description
IDeviceFactory

ConnectFirstAsync(IDeviceFactory, ILogger)

Declaration
public static async Task<IDevice> ConnectFirstAsync(this IDeviceFactory deviceFactory, ILogger logger = null)
Parameters
Type Name Description
IDeviceFactory deviceFactory
Microsoft.Extensions.Logging.ILogger logger
Returns
Type Description
System.Threading.Tasks.Task<IDevice>

GetFirstDeviceAsync(IDeviceFactory)

Declaration
public static async Task<IDevice> GetFirstDeviceAsync(this IDeviceFactory deviceFactory)
Parameters
Type Name Description
IDeviceFactory deviceFactory
Returns
Type Description
System.Threading.Tasks.Task<IDevice>

IsDefinitionMatch(FilterDeviceDefinition, ConnectedDeviceDefinition, DeviceType)

Compares a ConnectedDeviceDefinition with a FilterDeviceDefinition

Declaration
public static bool IsDefinitionMatch(this FilterDeviceDefinition filterDevice, ConnectedDeviceDefinition actualDevice, DeviceType deviceType)
Parameters
Type Name Description
FilterDeviceDefinition filterDevice
ConnectedDeviceDefinition actualDevice
DeviceType deviceType
Returns
Type Description
System.Boolean

True if the filterDevice matches the actualDevice

In This Article
Back to top Generated by DocFX