Show / Hide Table of Contents

Struct TransferResult

Represents the result of a read or write transfer

Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Device.Net
Assembly: Device.Net.dll
Syntax
public readonly struct TransferResult

Constructors

TransferResult(Byte[], UInt32)

Declaration
public TransferResult(byte[] data, uint bytesRead)
Parameters
Type Name Description
System.Byte[] data
System.UInt32 bytesRead

Properties

BytesTransferred

The number of bytes transferred

Declaration
public readonly uint BytesTransferred { get; }
Property Value
Type Description
System.UInt32

Data

The data that was transferred

Declaration
public readonly byte[] Data { get; }
Property Value
Type Description
System.Byte[]

Methods

ToString()

Declaration
public override readonly string ToString()
Returns
Type Description
System.String
Overrides
System.ValueType.ToString()

Operators

Implicit(TransferResult to Byte[])

Declaration
public static implicit operator byte[](TransferResult TransferResult)
Parameters
Type Name Description
TransferResult TransferResult
Returns
Type Description
System.Byte[]

Implicit(Byte[] to TransferResult)

This automatically converts an array of bytes to TransferResult. TODO: Remove this because it is too easy to swallow up the information of how many bytes were actually read

Declaration
public static implicit operator TransferResult(byte[] data)
Parameters
Type Name Description
System.Byte[] data
Returns
Type Description
TransferResult
In This Article
  • Constructors
    • TransferResult(Byte[], UInt32)
  • Properties
    • BytesTransferred
    • Data
  • Methods
    • ToString()
  • Operators
    • Implicit(TransferResult to Byte[])
    • Implicit(Byte[] to TransferResult)
Back to top Generated by DocFX