Ejemplo n.º 1
0
 internal Module(IntPtr handle, IntPtr?boxedHandle, bool ownsHandle = true)
 {
     this.handle      = new HType(handle, ownsHandle);
     this.boxedModule = boxedHandle.HasValue ? new BoxedModule(boxedHandle.Value) : null;
     //Debug.Assert (!this.handle.IsInvalid);
     //Debug.Assert (!this.boxedHandle.IsInvalid);
 }
Ejemplo n.º 2
0
                internal Module(IntPtr handle, IntPtr?boxedHandle, bool ownsHandle = true)
                {
                    this.handle      = new HType(handle, ownsHandle);
                    this.boxedModule = boxedHandle.HasValue ? new BoxedModule(boxedHandle.Value) : null;

                    if (handle != IntPtr.Zero)
                    {
                        foreach (var np in _named_parameters())
                        {
                            register_parameter(np.name, np.parameter);
                        }
                        foreach (var np in _named_buffers())
                        {
                            register_buffer(np.name, np.buffer);
                        }
                    }
                }