public static Type GetClrDataType(NetCdfDataType type) { if (type == NetCdfDataType.NC_BYTE) { return(typeof(byte)); } if (type == NetCdfDataType.NC_CHAR) { return(typeof(char)); } if (type == NetCdfDataType.NC_DOUBLE) { return(typeof(double)); } if (type == NetCdfDataType.NC_INT) { return(typeof(int)); } if (type == NetCdfDataType.NC_INT64) { return(typeof(long)); } if (type == NetCdfDataType.NC_FLOAT) { return(typeof(float)); } if (type == NetCdfDataType.NC_SHORT) { return(typeof(Int16)); } throw new NotSupportedException(string.Format("NetCDF type {0} cannot be converted to CLR type", type)); }
public static Type GetClrDataType(NetCdfDataType type) { if (type == NetCdfDataType.NC_BYTE) { return typeof (byte); } if (type == NetCdfDataType.NC_CHAR) { return typeof(char); } if (type == NetCdfDataType.NC_DOUBLE) { return typeof(double); } if (type == NetCdfDataType.NC_INT) { return typeof(int); } if (type == NetCdfDataType.NC_INT64) { return typeof(long); } if (type == NetCdfDataType.NC_FLOAT) { return typeof(float); } if (type == NetCdfDataType.NC_SHORT) { return typeof(Int16); } throw new NotSupportedException(string.Format("NetCDF type {0} cannot be converted to CLR type", type)); }
public static int nc_put_att_int(int ncid, int varid, string name, NetCdfDataType type, IntPtr len, int[] tp) { /* lock (LockObject) */ { var r = NetCDFInterop.nc_put_att_int(ncid, varid, name, type, len, tp); return r; } }
public static int nc_inq_vartype(int ncid, int varid, out NetCdfDataType xtypep) { /* lock (LockObject) */{ var r = NetCDFInterop.nc_inq_vartype(ncid, varid, out xtypep); return r; } }
public static int nc_inq_att(int ncid, int varid, string name, out NetCdfDataType type, out IntPtr length) { /* lock (LockObject) */{ var r = NetCDFInterop.nc_inq_att(ncid, varid, name, out type, out length); return r; } }
public static extern int nc_put_att_float(int ncid, int varid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8Marshaler))] string name, NetCdfDataType type, IntPtr len, float[] tp);
public static int nc_def_var(int ncid, string name, NetCdfDataType xtype, int ndims, int[] dimids, out int varidp) { /* lock (LockObject) */{ var r = NetCDFInterop.nc_def_var(ncid, name, xtype, ndims, dimids, out varidp); return r; } }
public static extern int nc_inq_vartype(int ncid, int varid, out NetCdfDataType xtypep);
public static extern int nc_inq_att(int ncid, int varid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8Marshaler))] string name, out NetCdfDataType type, out IntPtr length);
public static int nc_inq_att(int ncid, int varid, string name, out NetCdfDataType type, out IntPtr length) /* lock (LockObject) */ { { var r = NetCDFInterop.nc_inq_att(ncid, varid, name, out type, out length); return(r); } }
public static extern int nc_def_var(int ncid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8Marshaler))] string name, NetCdfDataType xtype, int ndims, int[] dimids, out int varidp);
public static extern int nc_put_att_float(int ncid, int varid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8Marshaler))] string name, NetCdfDataType type, IntPtr len, float[] tp);
public static int nc_inq_vartype(int ncid, int varid, out NetCdfDataType xtypep) /* lock (LockObject) */ { { var r = NetCDFInterop.nc_inq_vartype(ncid, varid, out xtypep); return(r); } }
public static int nc_def_var(int ncid, string name, NetCdfDataType xtype, int ndims, int[] dimids, out int varidp) /* lock (LockObject) */ { { var r = NetCDFInterop.nc_def_var(ncid, name, xtype, ndims, dimids, out varidp); return(r); } }
public static extern int nc_inq_att(int ncid, int varid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8Marshaler))] string name, out NetCdfDataType type, out IntPtr length);
public static extern int nc_inq_vartype(int ncid, int varid, out NetCdfDataType xtypep);
public static extern int nc_def_var(int ncid, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8Marshaler))] string name, NetCdfDataType xtype, int ndims, int[] dimids, out int varidp);
public static int nc_put_att_int(int ncid, int varid, string name, NetCdfDataType type, IntPtr len, int[] tp) /* lock (LockObject) */ { { var r = NetCDFInterop.nc_put_att_int(ncid, varid, name, type, len, tp); return(r); } }