Class DeviceBase
  
  Base class for all devices
 
  
  
    Inheritance
    System.Object
    DeviceBase
      
      
   
  
    Implements
    System.IDisposable
   
  
    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()
    
   
  
  Assembly: Device.Net.dll
  Syntax
  
    public abstract class DeviceBase : IDisposable
   
  Constructors
  
  
  
  
  DeviceBase(String, ILoggerFactory, ILogger)
  
  
  Declaration
  
    protected DeviceBase(string deviceId, ILoggerFactory loggerFactory = null, ILogger logger = null)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        deviceId | 
         | 
      
      
        | Microsoft.Extensions.Logging.ILoggerFactory | 
        loggerFactory | 
         | 
      
      
        | Microsoft.Extensions.Logging.ILogger | 
        logger | 
         | 
      
    
  
  Properties
  
  
  
  
  DeviceId
  
  
  Declaration
  
    public string DeviceId { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.String | 
         | 
      
    
  
  
  
  
  Logger
  
  
  Declaration
  
    protected ILogger Logger { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.Extensions.Logging.ILogger | 
         | 
      
    
  
  
  
  
  LoggerFactory
  
  
  Declaration
  
    protected ILoggerFactory LoggerFactory { get; }
   
  Property Value
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | Microsoft.Extensions.Logging.ILoggerFactory | 
         | 
      
    
  
  Methods
  
  
  
  
  Dispose()
  
  
  Declaration
  
    public virtual void Dispose()
   
  
  
  
  Dispose(Boolean)
  
  
  Declaration
  
    protected virtual void Dispose(bool dispose)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Boolean | 
        dispose | 
         | 
      
    
  
  
  
  
  Flush(CancellationToken)
  
  
  Declaration
  
    public virtual Task Flush(CancellationToken cancellationToken = default(CancellationToken))
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Threading.CancellationToken | 
        cancellationToken | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Threading.Tasks.Task | 
         | 
      
    
  
  
  
  
  GetDeviceDefinitionFromWindowsDeviceId(String, DeviceType, ILogger, Nullable<Guid>)
  
  
  Declaration
  
    public static ConnectedDeviceDefinition GetDeviceDefinitionFromWindowsDeviceId(string deviceId, DeviceType deviceType, ILogger logger, Guid? classGuid = null)
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.String | 
        deviceId | 
         | 
      
      
        | DeviceType | 
        deviceType | 
         | 
      
      
        | Microsoft.Extensions.Logging.ILogger | 
        logger | 
         | 
      
      
        | System.Nullable<System.Guid> | 
        classGuid | 
         | 
      
    
  
  Returns
  
  
  
  
  ReadAsync(CancellationToken)
  
  
  Declaration
  
    public abstract Task<TransferResult> ReadAsync(CancellationToken cancellationToken = default(CancellationToken))
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Threading.CancellationToken | 
        cancellationToken | 
         | 
      
    
  
  Returns
  
  
  
  
  WriteAndReadAsync(Byte[], CancellationToken)
  
  
  Declaration
  
    public async Task<TransferResult> WriteAndReadAsync(byte[] writeBuffer, CancellationToken cancellationToken = default(CancellationToken))
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Byte[] | 
        writeBuffer | 
         | 
      
      
        | System.Threading.CancellationToken | 
        cancellationToken | 
         | 
      
    
  
  Returns
  
  
  
  
  WriteAsync(Byte[], CancellationToken)
  
  
  Declaration
  
    public abstract Task<uint> WriteAsync(byte[] data, CancellationToken cancellationToken = default(CancellationToken))
   
  Parameters
  
    
      
        | Type | 
        Name | 
        Description | 
      
    
    
      
        | System.Byte[] | 
        data | 
         | 
      
      
        | System.Threading.CancellationToken | 
        cancellationToken | 
         | 
      
    
  
  Returns
  
    
      
        | Type | 
        Description | 
      
    
    
      
        | System.Threading.Tasks.Task<System.UInt32> | 
         | 
      
    
  
  Implements
  
      System.IDisposable