Exemplo n.º 1
0
        public bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                disposedValue = true;

                if (this._nearest != null)
                {
                    this._nearest.Dispose();
                }

                if (this.BufferHandle.IsAllocated)
                {
                    SWIGTYPE_p_grib_multi_handle mh = new SWIGTYPE_p_grib_multi_handle(this.Handle.Reference.Handle, false);
                    GribApiProxy.GribMultiHandleDelete(mh);
                    this.BufferHandle.Free();
                }
            }
        }
Exemplo n.º 2
0
        public bool disposedValue = false; // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                disposedValue = true;

                if (this._nearest != null)
                {
                    this._nearest.Dispose();
                }

                if (this.OwnsMemory)
                {
                    SWIGTYPE_p_grib_multi_handle mh = new SWIGTYPE_p_grib_multi_handle(this.Handle.Reference.Handle, false);
                    GribApiProxy.GribMultiHandleDelete(mh);
                    // Marshal.FreeHGlobal(this.NativeBuffer);
                    this.NativeBuffer = IntPtr.Zero;
                }
            }
        }
Exemplo n.º 3
0
  public static void GribMultiHandleWrite(SWIGTYPE_p_grib_multi_handle mh, GribFile f) {
    int ret = GribApiProxyPINVOKE.GribMultiHandleWrite(SWIGTYPE_p_grib_multi_handle.getCPtr(mh), f.Reference);
	
	if (ret != 0)
	{
		throw Grib.Api.Interop.GribApiException.Create(ret);
	}
  }
Exemplo n.º 4
0
  public static void GribMultiHandleDelete(SWIGTYPE_p_grib_multi_handle mh) {
    int ret = GribApiProxyPINVOKE.GribMultiHandleDelete(SWIGTYPE_p_grib_multi_handle.getCPtr(mh));
	
	if (ret != 0)
	{
		throw Grib.Api.Interop.GribApiException.Create(ret);
	}
  }
Exemplo n.º 5
0
  public static void GribMultiHandleAppend(GribHandle h, int start_section, SWIGTYPE_p_grib_multi_handle mh) {
    int ret = GribApiProxyPINVOKE.GribMultiHandleAppend(h.Reference, start_section, SWIGTYPE_p_grib_multi_handle.getCPtr(mh));
	
	if (ret != 0)
	{
		throw Grib.Api.Interop.GribApiException.Create(ret);
	}
  }
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_grib_multi_handle obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_grib_multi_handle obj) {
   return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
 }