Microsoft.Research.Science.Data.NetCDF4.NetCDFDataSet.HandleResult(int)

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 7

1. Example

Project: SDSlite
Source File: NetCDFDataSet.cs
View license
internal 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;
        }

2. Example

Project: SDSlite
Source File: NetCDFDataSet.cs
View license
internal 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;
        }

3. Example

Project: SDSlite
Source File: NetCDFDataSet.cs
View license
protected 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);
        }

4. Example

Project: SDSlite
Source File: NetCDFDataSet.cs
View license
protected 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;
        }

5. Example

Project: SDSlite
Source File: NetCDFDataSet.cs
View license
public void Store()
        {
            if (modified)
            {
                string s = ToString();
                int res = NetCDFDataSet.NcPutAttText(ncid, varid, AttributeName, s);
                NetCDFDataSet.HandleResult(res);
                modified = false;
            }
        }

6. Example

Project: SDSlite
Source File: NetCDFDataSet.cs
View license
protected 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();
            }
        }

7. Example

Project: SDSlite
Source File: NetCDFDataSet.cs
View license
private Variable ReadNetCdfVariable(int varid)
        {
            NcType type;
            Type c/n ..... /n //View Source file for more details /n }

8. Example

Project: SDSlite
Source File: NetCDFDataSet.cs
View license
protected override void OnRollback()
        {
            if (initializing) return;
            if /n ..... /n //View Source file for more details /n }

9. Example

Project: SDSlite
Source File: NetCDFDataSet.cs
View license
internal object ReadNetCdfAttribute(int varid, string aname, AttributeTypeMap atm)
        {
       /n ..... /n //View Source file for more details /n }

10. Example

Project: SDSlite
Source File: NetCDFDataSet.cs
View license
internal void WriteNetCdfAttribute(int varid, string name, object value, AttributeTypeMap atm)
     /n ..... /n //View Source file for more details /n }

11. Example

Project: SDSlite
Source File: NetCDFDataSet.cs
View license
private void InitializeFromFile(string fileName, ResourceOpenMode openMode)
        {
            bo/n ..... /n //View Source file for more details /n }