Exemplo n.º 1
0
        internal int verify(string file, string database, System.IO.TextWriter handle, BDB_FileWriteDelegate callback, uint flags)
        {
            int ret;

            ret = libdb_csharpPINVOKE.DB_verify(swigCPtr, file, database, handle, callback, flags);
            /* Verify is a db handle destructor.  Reflect that in the wrapper class. */
            swigCMemOwn = false;
            swigCPtr    = new HandleRef(null, IntPtr.Zero);
            DatabaseException.ThrowException(ret);
            return(ret);
        }
Exemplo n.º 2
0
 public virtual void Dispose()
 {
     lock (this) {
         if (swigCPtr.Handle != IntPtr.Zero && swigCMemOwn)
         {
             swigCMemOwn = false;
         }
         swigCPtr = new HandleRef(null, IntPtr.Zero);
         GC.SuppressFinalize(this);
     }
 }
Exemplo n.º 3
0
        internal int rename(string file, string database, string newname, uint flags)
        {
            int ret;

            ret = libdb_csharpPINVOKE.DB_rename(swigCPtr, file, database, newname, flags);

            /*
             * rename is a handle destructor, regardless of whether the rename
             * succeeds.  Reflect that in the wrapper class.
             */
            swigCPtr = new HandleRef(null, IntPtr.Zero);
            DatabaseException.ThrowException(ret);
            return(ret);
        }
Exemplo n.º 4
0
        internal int remove(DB_TXN txn, uint flags)
        {
            int ret;

            ret = libdb_csharpPINVOKE.DB_SEQUENCE_remove(swigCPtr, DB_TXN.getCPtr(txn), flags);

            /*
             * remove is a handle destructor, regardless of whether the remove
             * succeeds.  Reflect that in the wrapper class.
             */
            swigCPtr = new HandleRef(null, IntPtr.Zero);
            DatabaseException.ThrowException(ret);
            return(ret);
        }
Exemplo n.º 5
0
        internal int remove()
        {
            int ret;

            ret = libdb_csharpPINVOKE.DB_SITE_remove(swigCPtr);

            /*
             * remove is a handle destructor, regardless of whether the remove
             * succeeds.  Reflect that in the wrapper class.
             */
            swigCPtr = new HandleRef(null, IntPtr.Zero);
            DatabaseException.ThrowException(ret);
            return(ret);
        }
Exemplo n.º 6
0
 public virtual void Dispose()
 {
     lock (this) {
         if (swigCPtr.Handle != global::System.IntPtr.Zero)
         {
             if (swigCMemOwn)
             {
                 swigCMemOwn = false;
                 libdb_csharpPINVOKE.delete_DB_TXN(swigCPtr);
             }
             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
         }
         global::System.GC.SuppressFinalize(this);
     }
 }
Exemplo n.º 7
0
        internal int close(uint flags)
        {
            int ret = libdb_csharpPINVOKE.DB_SEQUENCE_close(swigCPtr, flags);

            if (ret == 0)
            {
                /* Close is a db handle destructor.  Reflect that in the wrapper class. */
                swigCPtr = new HandleRef(null, IntPtr.Zero);
            }
            else
            {
                DatabaseException.ThrowException(ret);
            }
            return(ret);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Get VectorUnsignedChar from System.IO.Stream.
        /// This funcion exist only for Constructor.
        /// </summary>
        /// This will not be public opened.
        private static VectorUnsignedChar GetRawBuffrFromStreamHelper(System.IO.Stream stream)
        {
            if (stream == null)
            {
                throw new ArgumentNullException(nameof(stream));
            }
            if (!stream.CanRead)
            {
                throw new InvalidOperationException("stream don't support to read");
            }

            // Copy stream to memoryStream
            System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
            stream.CopyTo(memoryStream);
            memoryStream.Seek(0, System.IO.SeekOrigin.Begin);

            long streamLength = memoryStream.Length;

            if (streamLength <= 0)
            {
                throw new InvalidOperationException("stream length is <= 0");
            }

            // Allocate buffer that internal DALi engine can read
            VectorUnsignedChar buffer = new VectorUnsignedChar();

            buffer.Resize((uint)streamLength);
            var bufferBegin = buffer.Begin();

            global::System.Runtime.InteropServices.HandleRef bufferRef = SWIGTYPE_p_unsigned_char.getCPtr(bufferBegin);

            // Copy data from memoryStream to buffer
            System.Runtime.InteropServices.Marshal.Copy(memoryStream.GetBuffer(), 0, bufferRef.Handle, (int)streamLength);

            memoryStream.Dispose();

            return(buffer);
        }
Exemplo n.º 9
0
 public static extern int SpatialReference_ImportFromWkt(global::System.Runtime.InteropServices.HandleRef jarg1, ref string jarg2);
Exemplo n.º 10
0
 public static extern global::System.IntPtr CreateCoordinateTransformation(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
Exemplo n.º 11
0
 public static extern int SpatialReference_ImportFromEPSGA(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
Exemplo n.º 12
0
 public static extern int SpatialReference_ImportFromERM(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, string jarg3, string jarg4);
Exemplo n.º 13
0
 public static extern void CoordinateTransformation_TransformPoints(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, double[] jarg3, double[] jarg4, double[] jarg5);
Exemplo n.º 14
0
 public static extern int SpatialReference_SetGeogCS(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, string jarg3, string jarg4, double jarg5, double jarg6, string jarg7, double jarg8, string jarg9, double jarg10);
Exemplo n.º 15
0
 public static extern int SpatialReference_GetTOWGS84(global::System.Runtime.InteropServices.HandleRef jarg1, double[] jarg2);
Exemplo n.º 16
0
 public static extern int SpatialReference_SetTOWGS84(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2, double jarg3, double jarg4, double jarg5, double jarg6, double jarg7, double jarg8);
Exemplo n.º 17
0
 public static extern int SpatialReference_MorphFromESRI(global::System.Runtime.InteropServices.HandleRef jarg1);
Exemplo n.º 18
0
 public static extern int SpatialReference_ExportToMICoordSys(global::System.Runtime.InteropServices.HandleRef jarg1, out string jarg2);
Exemplo n.º 19
0
 public static extern global::System.IntPtr SpatialReference_Clone(global::System.Runtime.InteropServices.HandleRef jarg1);
Exemplo n.º 20
0
 public static extern int SpatialReference_ExportToUSGS(global::System.Runtime.InteropServices.HandleRef jarg1, out int jarg2, out int jarg3, out int jarg5);
Exemplo n.º 21
0
 public static extern int SpatialReference_ExportToPrettyWkt(global::System.Runtime.InteropServices.HandleRef jarg1, out string jarg2, int jarg3);
Exemplo n.º 22
0
 public static extern int SpatialReference_ImportFromOzi(global::System.Runtime.InteropServices.HandleRef jarg1, IntPtr[] jarg2);
Exemplo n.º 23
0
 public static extern int SpatialReference_SetCompoundCS(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.Runtime.InteropServices.HandleRef jarg4);
Exemplo n.º 24
0
 public static extern global::System.IntPtr SpatialReference_ConvertToOtherProjection(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, IntPtr[] jarg3);
Exemplo n.º 25
0
 public static extern int SpatialReference_SetGeocCS(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
Exemplo n.º 26
0
 public static extern void delete_CoordinateTransformation(global::System.Runtime.InteropServices.HandleRef jarg1);
Exemplo n.º 27
0
 internal DB_SEQUENCE(global::System.IntPtr cPtr, bool cMemoryOwn)
 {
     swigCMemOwn = cMemoryOwn;
     swigCPtr    = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
 }
Exemplo n.º 28
0
 public static extern void CoordinateTransformation_TransformPoint__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, double[] jarg2);
Exemplo n.º 29
0
 public static extern int SpatialReference_Fixup(global::System.Runtime.InteropServices.HandleRef jarg1);
Exemplo n.º 30
0
 public static extern int SpatialReference_ImportFromUSGS(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3, double[] jarg4, int jarg5);