Skip to content

1.1.0

Latest
Compare
Choose a tag to compare
@badcel badcel released this 18 Aug 14:32
ca300b2

This release adds new method overloads to Device.Read and Device.ReadTimeout. The original signature required the caller to pass in the size of the buffer, allowing HidApi.Net to allocate the buffer and return the result.

The new signatures allow the caller to directly pass in a buffer of type Span<byte>. This gives the caller some benefits:

  • Allow to reuse an existing buffer, thus avoiding unnecessary buffer allocations.
  • As Span<T> can represent different kinds of memory (managed, native, stack) the caller can decide which kind of memory should be used.

What's Changed

New Contributors

Full Changelog: 1.0.4...1.1.0