static H5DLLImporter() { H5.open(); switch (Environment.OSVersion.Platform) { case PlatformID.Win32NT: case PlatformID.Win32S: case PlatformID.Win32Windows: case PlatformID.WinCE: Instance = new H5WindowsDLLImporter(Constants.DLLFileName); break; case PlatformID.Xbox: case PlatformID.MacOSX: Instance = new H5UnixDllImporter(Constants.DLLFileName); break; case PlatformID.Unix: // Instance = new H5WindowsDLLImporter(Constants.DLLFileName); Instance = new H5UnixDllImporter(Constants.DLLFileName); break; default: throw new NotImplementedException();; } }
static H5DLLImporter() { if (H5.open() < 0) { throw new Exception("Could not initialize HDF5 library."); } if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { Instance = new H5LinuxDllImporter(Constants.DLLFileName); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { Instance = new H5MacDllImporter(Constants.DLLFileName); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { Instance = new H5WindowsDLLImporter(Constants.DLLFileName); } else { throw new PlatformNotSupportedException(); } }
static H5DLLImporter() { // .NET Framework does not automatically load libraries from the native runtimes folder like .NET Core. // Therefore, if running .NET Framework, switch the current directory to the native runtime folder // before attempting to load the native HDF5 library. bool changedCurrentDir = false; var prevCurrentDir = Directory.GetCurrentDirectory(); if (RuntimeInformation.FrameworkDescription.Contains("Framework")) { var dllDir = Path.Combine(prevCurrentDir, string.Format(Constants.WindowsDLLPath, Environment.Is64BitProcess ? "64" : "86")); if (Directory.Exists(dllDir)) { Directory.SetCurrentDirectory(dllDir); changedCurrentDir = true; } } try { if (H5.open() < 0) { throw new Exception("Could not initialize HDF5 library."); } } finally { if (changedCurrentDir) { Directory.SetCurrentDirectory(prevCurrentDir); } } if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { Instance = new H5LinuxDllImporter(Constants.DLLFileName); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { Instance = new H5MacDllImporter(Constants.DLLFileName); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { Instance = new H5WindowsDLLImporter(Constants.DLLFileName); } else { throw new PlatformNotSupportedException(); } }
static H5S() { H5.open(); }
public extern static herr_t iterate_by_name(hid_t loc_id, string obj_name, H5.index_t idx_type, H5.iter_order_t order, ref hsize_t n, operator_t op, IntPtr op_data, hid_t lapd_id = H5P.DEFAULT);
public extern static ssize_t get_name_by_idx(hid_t loc_id, string obj_name, H5.index_t idx_type, H5.iter_order_t order, hsize_t n, IntPtr name, size_t size, hid_t lapl_id);
public extern static ssize_t get_name_by_idx (hid_t loc_id, byte[] obj_name, H5.index_t idx_type, H5.iter_order_t order, hsize_t n, [Out] byte[] name, size_t size, hid_t lapl_id = H5P.DEFAULT);
public extern static herr_t delete_by_idx (hid_t loc_id, byte[] obj_name, H5.index_t idx_type, H5.iter_order_t order, hsize_t n, hid_t lapl_id = H5P.DEFAULT);
public extern static herr_t visit_by_name (hid_t loc_id, string obj_name, H5.index_t idx_type, H5.iter_order_t order, iterate_t op, IntPtr op_data, hid_t lapl_id = H5P.DEFAULT);
public extern static hid_t open_by_idx (hid_t loc_id, byte[] group_name, H5.index_t idx_type, H5.iter_order_t order, hsize_t n, hid_t lapl_id = H5P.DEFAULT);
static H5AC() { H5.open(); }
static H5D() { H5.open(); }
static H5DO() { H5.open(); }
static H5O() { H5.open(); }
static H5G() { H5.open(); }
static H5PL() { H5.open(); }
static H5E() { H5.open(); }
static H5I() { H5.open(); }
public extern static herr_t visit (hid_t obj_id, H5.index_t idx_type, H5.iter_order_t order, iterate_t op, IntPtr op_data);
static H5FD() { H5.open(); }
static H5F() { H5.open(); }
static H5E() { H5.open(); m_importer = H5DLLImporter.Create(); }
public extern static herr_t get_info_by_idx (hid_t loc_id, string obj_name, H5.index_t idx_type, H5.iter_order_t order, hsize_t n, ref info_t ainfo, hid_t lapl_id = H5P.DEFAULT);
static H5R() { H5.open(); }
public extern static ssize_t get_name_by_idx (hid_t loc_id, string obj_name, H5.index_t idx_type, H5.iter_order_t order, hsize_t n, StringBuilder name, size_t size, hid_t lapl_id = H5P.DEFAULT);
public extern static herr_t iterate_by_name (hid_t loc_id, byte[] group_name, H5.index_t idx_type, H5.iter_order_t order, ref hsize_t idx, iterate_t op, IntPtr op_data, hid_t lapl_id = H5P.DEFAULT);
public extern static herr_t iterate (hid_t obj_id, H5.index_t idx_type, H5.iter_order_t order, ref hsize_t n, operator_t op, IntPtr op_data);
public extern static herr_t get_val_by_idx (hid_t loc_id, string group_name, H5.index_t idx_type, H5.iter_order_t order, hsize_t n, [Out] IntPtr buf, size_t size, hid_t lapl_id = H5P.DEFAULT);
public extern static hid_t open_by_idx (hid_t loc_id, string obj_name, H5.index_t idx_type, H5.iter_order_t order, hsize_t n, hid_t aapl_id = H5P.DEFAULT, hid_t lapl_id = H5P.DEFAULT);
static H5Z() { H5.open(); }