Skip to content

Must Have's for High Level .NET APIs

Owen Andrew Jørgensen edited this page Sep 2, 2023 · 4 revisions

General

  • Thread-safe
  • NumPy-like arrays and dtype-like data type objects
  • "Standard" exceptions

Strings

  • Only string at the API level

Identifiers

  • Immutable (read-only)
  • Implement IDisposable

hid_t and htri_t wrappers

  • It'd be nice to have something like this so you don't have to define hid_t and htri_t:
  public struct hid_t
  {
#if HDF5_VER1_10
    private System.Int64 id;
#else
    private System.Int32 id;
#endif

#if HDF5_VER1_10
    public static implicit operator Int64(hid_t id)
#else
    public static implicit operator Int32(hid_t id)
#endif
    {
      return id.id;
    }

#if HDF5_VER1_10
    public static implicit operator hid_t(Int64 id)
#else
    public static implicit operator hid_t(Int32 id)
#endif
    {
      return new hid_t() { id = id };
    }
  }

File names

  • Unicode filename string support (i.e. filenames and paths with special characters in them, i.e. ````c:\æ\ø.h5```)