Skip to content

Must Have's for High Level .NET APIs

obergshavefun edited this page Mar 30, 2016 · 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 };
    }
  }