Here are the examples of the csharp api class Microsoft.Research.Science.Data.NetCDF4.NetCDFDataSet.HandleResult(int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
11 Examples
0
1. Example
View licenseinternal static string NcGetAttText(int ncid, int varid, string aname, int len, out int res) { string strvalue = null; res = NetCDF.nc_get_att_text(ncid, varid, aname, out strvalue, len); NetCDFDataSet.HandleResult(res); return strvalue; }
0
2. Example
View licenseinternal static int NcPutAttText(int ncid, int varid, string aname, string value) { int res = NetCDF.nc_put_att_text(ncid, varid, aname, value); NetCDFDataSet.HandleResult(res); return res; }
0
3. Example
View licenseprotected override void OnCommit() { if (initializing) return; int res; res = NetCDF.nc_enddef(ncid); res = NetCDF.nc_sync(ncid); HandleResult(res); if (tempFileName != null && File.Exists(tempFileName)) File.Delete(tempFileName); tempFileName = null; }
0
4. Example
View licenseprotected override void Dispose(bool disposing) { if (ncid >= 0) { try { int res = NetCDF.nc_close(ncid); if (disposing) HandleResult(res); if (tempFileName != null) File.Delete(tempFileName); } catch (Exception ex) { Trace.WriteLineIf(TraceNetCDFDataSet.TraceError, "NetCDF Dispose exception: " + ex.Message); } } base.Dispose(disposing); }
0
5. Example
View licensepublic void Store() { if (modified) { string s = ToString(); int res = NetCDFDataSet.NcPutAttText(ncid, varid, AttributeName, s); NetCDFDataSet.HandleResult(res); modified = false; } }
0
6. Example
View licenseprotected override void OnTransactionOpened() { /* Storing existing file for possible rollback */ if (!initializing && rollbackEnabled) { tempFileName = Path.GetTempFileName(); int res = NetCDF.nc_close(ncid); HandleResult(res); File.Copy(((NetCDFUri)this.uri).FileName, tempFileName, true); res = NetCDF.nc_open(((NetCDFUri)this.uri).FileName, CreateMode.NC_WRITE, out ncid); HandleResult(res); // After the open, dimensions id can change. UpdateDimIds(); } }
0
7. Example
View licenseprivate Variable ReadNetCdfVariable(int varid) { NcType type; Type c/n ..... /n //View Source file for more details /n }
0
8. Example
View licenseprotected override void OnRollback() { if (initializing) return; if /n ..... /n //View Source file for more details /n }
0
9. Example
View licenseinternal object ReadNetCdfAttribute(int varid, string aname, AttributeTypeMap atm) { /n ..... /n //View Source file for more details /n }
0
10. Example
View licenseinternal void WriteNetCdfAttribute(int varid, string name, object value, AttributeTypeMap atm) /n ..... /n //View Source file for more details /n }
0
11. Example
View licenseprivate void InitializeFromFile(string fileName, ResourceOpenMode openMode) { bo/n ..... /n //View Source file for more details /n }