Esempio n. 1
0
        internal int CompareCallback16(IntPtr ptr, int len1, IntPtr ptr1, int len2, IntPtr ptr2)
        {
            int num;

            try
            {
                num = this.Compare(SQLite3_UTF16.UTF16ToString(ptr1, len1), SQLite3_UTF16.UTF16ToString(ptr2, len2));
            }
            catch (Exception exception1)
            {
                Exception exception = exception1;
                try
                {
                    if (HelperMethods.LogCallbackExceptions(this._flags))
                    {
                        CultureInfo currentCulture = CultureInfo.CurrentCulture;
                        object[]    objArray       = new object[] { "Compare (UTF16)", exception };
                        SQLiteLog.LogMessage(-2146233088, HelperMethods.StringFormat(currentCulture, "Caught exception in \"{0}\" method: {1}", objArray));
                    }
                }
                catch
                {
                }
                if (this._base != null && this._base.IsOpen())
                {
                    this._base.Cancel();
                }
                return(0);
            }
            return(num);
        }
        internal override string ColumnName(SQLiteStatement stmt, int index)
        {
            int    num    = 0;
            IntPtr intPtr = UnsafeNativeMethods.sqlite3_column_name16_interop(stmt._sqlite_stmt, index, ref num);

            if (intPtr == IntPtr.Zero)
            {
                throw new SQLiteException(SQLiteErrorCode.NoMem, this.GetLastError());
            }
            return(SQLite3_UTF16.UTF16ToString(intPtr, num));
        }
        internal override string ColumnDatabaseName(SQLiteStatement stmt, int index)
        {
            int num = 0;

            return(SQLite3_UTF16.UTF16ToString(UnsafeNativeMethods.sqlite3_column_database_name16_interop(stmt._sqlite_stmt, index, ref num), num));
        }
 public override string ToString(IntPtr b, int nbytelen)
 {
     this.CheckDisposed();
     return(SQLite3_UTF16.UTF16ToString(b, nbytelen));
 }
        internal override string GetText(SQLiteStatement stmt, int index)
        {
            int num = 0;

            return(SQLite3_UTF16.UTF16ToString(UnsafeNativeMethods.sqlite3_column_text16_interop(stmt._sqlite_stmt, index, ref num), num));
        }
        internal override string GetParamValueText(IntPtr ptr)
        {
            int num = 0;

            return(SQLite3_UTF16.UTF16ToString(UnsafeNativeMethods.sqlite3_value_text16_interop(ptr, ref num), num));
        }